码迷,mamicode.com
首页 >  
搜索关键字:leetcode 19    ( 34993个结果
【LeetCode】Best Time to Buy and Sell Stock
Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to compl...
分类:其他好文   时间:2014-05-12 05:56:14    阅读次数:315
【LeetCode】Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.1. 将LinkedList的值保存到一个数组中,转化成Convert Sorte...
分类:其他好文   时间:2014-05-12 05:53:09    阅读次数:367
[leetcode]Flatten Binary Tree to Linked List @ Python
原题地址:http://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/题意:Given a binary tree, flatten it to a linked list in-place.For example,Given...
分类:编程语言   时间:2014-05-12 05:30:32    阅读次数:367
leetcode | Text Justification
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You shoul...
分类:其他好文   时间:2014-05-11 15:15:29    阅读次数:287
LeetCode--Search Insert Position
Search Insert Position  Total Accepted: 14091 Total Submissions: 41005My Submissions Given a sorted array and a target value, return the index if the target is found. If not, return the in...
分类:其他好文   时间:2014-05-11 05:53:03    阅读次数:241
day31-day67总结
lz惭愧啊.. 本来是30天就要总结,但是拖到了今天才总结 翻了下我之前的帖子,现在进行如下的总结 在这30多天的时间里,我付出最多的估计就是去刷Leetcode了.. 博主虽然在大一曾经兴起,刷了一下杭电的oj,但是没有坚持下来。。现在想想,如果坚持下来的话,如今就完全不一样了.哎 这件事告诉我,一件事如果坚持下来,哪怕是再小的事,也能产生很大的作用 还有,不要轻易放弃,如果决定了,...
分类:其他好文   时间:2014-05-11 04:14:25    阅读次数:354
Leetcode 位运算 Single NumberII
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Single Number II  Total Accepted: 14224 Total Submissions: 43648 Given an array of integers, every element appears three ti...
分类:其他好文   时间:2014-05-11 03:54:46    阅读次数:317
[LeetCode]Binary Tree Maximum Path Sum, 解题报告
题目 Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example: Given the below binary tree,...
分类:其他好文   时间:2014-05-11 03:25:24    阅读次数:298
Leetcode 位运算 Single Number
题意:在一组数组中除一个元素外其它元素都出现两次,找出这个元素 思路:位运算。异或。因为异或操作可以交换元素的顺序,所以元素异或的顺序没影响, 最后出现再次的元素都会被异或掉,相当于0和只出现一次的那个元素异或,结果还是那个元素 推广:这个方法也适合于出现其它元素都出现偶数次,而要找的元素出现奇数次的情况 相关题目:Single Number II class Solution...
分类:其他好文   时间:2014-05-11 02:37:42    阅读次数:397
Leetcode 树 Maximum Depth of Binary Tree
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Maximum Depth of Binary Tree  Total Accepted: 16605 Total Submissions: 38287 Given a binary tree, find its maximum depth. ...
分类:其他好文   时间:2014-05-11 01:58:31    阅读次数:441
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!