上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页
摘要: Add and Search Word - Data structure designDesign a data structure that supports the following two operations:void addWord(word)bool search(word)searc... 阅读全文
posted @ 2015-07-12 20:45 `Liok 阅读(470) 评论(0) 推荐(0) 编辑
摘要: Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.Ac... 阅读全文
posted @ 2015-07-12 19:31 `Liok 阅读(585) 评论(0) 推荐(0) 编辑
摘要: Palindrome Linked ListGiven a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?https://leetco... 阅读全文
posted @ 2015-07-12 15:48 `Liok 阅读(616) 评论(0) 推荐(0) 编辑
摘要: Number of Digit OneGiven an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example:Gi... 阅读全文
posted @ 2015-07-08 23:46 `Liok 阅读(525) 评论(0) 推荐(0) 编辑
摘要: Implement Queue using StacksImplement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes... 阅读全文
posted @ 2015-07-08 00:55 `Liok 阅读(472) 评论(0) 推荐(0) 编辑
摘要: Implement Trie (Prefix Tree)Implement a trie withinsert,search, andstartsWithmethods.https://leetcode.com/problems/implement-trie-prefix-tree/实现字典树,每个... 阅读全文
posted @ 2015-07-07 13:29 `Liok 阅读(902) 评论(0) 推荐(0) 编辑
摘要: Power of TwoGiven an integer, write a function to determine if it is a power of two.https://leetcode.com/problems/power-of-two/二分。2的整数次幂,要么开方后是整数(这个数也... 阅读全文
posted @ 2015-07-06 13:31 `Liok 阅读(372) 评论(0) 推荐(0) 编辑
摘要: Largest NumberGiven a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the larg... 阅读全文
posted @ 2015-07-06 13:19 `Liok 阅读(323) 评论(0) 推荐(0) 编辑
摘要: Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may ... 阅读全文
posted @ 2015-07-03 23:35 `Liok 阅读(283) 评论(0) 推荐(0) 编辑
摘要: Kth Smallest Element in a BSTGiven a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is alw... 阅读全文
posted @ 2015-07-02 22:25 `Liok 阅读(631) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页