码迷,mamicode.com
首页 >  
搜索关键字:leecode    ( 178个结果
[leecode]Clone Graph
Clone GraphClone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are l...
分类:其他好文   时间:2014-08-25 22:22:44    阅读次数:237
[leecode]Word Break II
Word Break IIGiven a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all...
分类:其他好文   时间:2014-08-24 23:46:03    阅读次数:244
LeetCode (1) Merge Sorted Array
题目: Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space to hold additional elements from B. The number of elements initia...
分类:其他好文   时间:2014-08-15 18:00:09    阅读次数:194
[leecode]Evaluate Reverse Polish Notation
Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may ...
分类:其他好文   时间:2014-08-05 10:57:19    阅读次数:184
(待解决)leecode 分词利用词典分词 word break
不戚戚于贫贱,不汲汲于富贵 ---五柳先生Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dict.....
分类:其他好文   时间:2014-07-03 20:21:27    阅读次数:225
leecode 回文字符串加强版
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
分类:其他好文   时间:2014-07-03 19:38:58    阅读次数:287
在一个数组中除两个数字只出现1次外,其它数字都出现了2次
前面总结了leecode上,改为成3出现,只有1个出现1次,的是通过记录每个位的个数来实现的如果count%3=1则为1,否则为0,实现起来充分利用了位运算。编程之美上的,没有写过,今天写一下。http://blog.csdn.net/morewindows/article/details/8214...
分类:其他好文   时间:2014-07-03 10:33:52    阅读次数:220
就是两个链表中的数相加
想起那夕阳下的奔跑,那是我逝去的青春 ----万万没想到我一看到,就觉得很简单,因为就是那个大数相加的思想啊,后来才知道各种情况,调了2个多小时,坑爹,不过leecode测试用例非常好。1.链表合并,跟那个有序链表合并为一个类似,2.合并之后,利用大数相加,超过十进位,最后一个节点要特殊处理,我写....
分类:其他好文   时间:2014-07-02 21:05:19    阅读次数:194
树中是否存在路径和为 sum leecode java
https://oj.leetcode.com/problems/path-sum//** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNod...
分类:编程语言   时间:2014-07-01 13:09:20    阅读次数:198
leecode 树是否是平衡树 java
https://oj.leetcode.com/problems/validate-binary-search-tree/1.中序遍历是否有序/** * Definition for binary tree * public class TreeNode { * int val; * ...
分类:编程语言   时间:2014-07-01 12:20:06    阅读次数:173
178条   上一页 1 ... 15 16 17 18 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!