上一页 1 ··· 4 5 6 7 8 9 下一页

2015年11月24日

摘要: Length of Last WordGiven a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the strin... 阅读全文
posted @ 2015-11-24 06:58 一心一念 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Longest WordsGiven a dictionary, find all of the longest words in the dictionary.ExampleGiven{ "dog", "google", "facebook", "internationalization"... 阅读全文
posted @ 2015-11-24 05:58 一心一念 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Write a method to replace all spaces in a string with %20. The string is given in a characters array, you can assume it has enough space for replaceme... 阅读全文
posted @ 2015-11-24 02:47 一心一念 阅读(145) 评论(0) 推荐(0) 编辑

2015年11月21日

摘要: Number of IslandsGiven a boolean 2D matrix, find the number of islands.ExampleGiven graph:[ [1, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 0, 0, 1, 1], [0,... 阅读全文
posted @ 2015-11-21 03:58 一心一念 阅读(136) 评论(0) 推荐(0) 编辑

2015年11月17日

摘要: Invert Binary TreeInvert a binary tree.Example 1 1 / \ / \2 3 => 3 2 / \ 4 4ChallengeDo it in recursion is accept... 阅读全文
posted @ 2015-11-17 04:39 一心一念 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Reverse Linked ListReverse a linked list.ExampleFor linked list 1->2->3, the reversed linked list is 3->2->1ChallengeReverse it in-place and in one-pa... 阅读全文
posted @ 2015-11-17 04:18 一心一念 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Postorder TraversalGiven a binary tree, return thepostordertraversal of its nodes' values.Given binary tree{1,#,2,3}, 1 \ 2 / ... 阅读全文
posted @ 2015-11-17 04:02 一心一念 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Inorder TraversalGiven a binary tree, return theinordertraversal of its nodes' values.Given binary tree{1,#,2,3}, 1 \ 2 / 3r... 阅读全文
posted @ 2015-11-17 03:36 一心一念 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Preorder TraversalGiven a binary tree, return the preorder traversal of its nodes' values.Given: 1 / \ 2 3 / \4 5return [1,2,4,5... 阅读全文
posted @ 2015-11-17 03:16 一心一念 阅读(158) 评论(0) 推荐(0) 编辑

2015年11月14日

摘要: Count and SayThe count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11... 阅读全文
posted @ 2015-11-14 04:49 一心一念 阅读(233) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页

导航