上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 50 下一页
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, 阅读全文
posted @ 2018-10-03 02:23 轻风舞动 阅读(339) 评论(0) 推荐(0) 编辑
摘要: Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. For example,MovingAverage m = new Mo 阅读全文
posted @ 2018-10-02 13:09 轻风舞动 阅读(1292) 评论(0) 推荐(0) 编辑
摘要: In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文
posted @ 2018-10-02 09:32 轻风舞动 阅读(1139) 评论(0) 推荐(0) 编辑
摘要: Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree. You may assume each number in the seq 阅读全文
posted @ 2018-10-02 09:16 轻风舞动 阅读(616) 评论(0) 推荐(0) 编辑
摘要: This is a follow up of Shortest Word Distance. The only difference is now you are given the list of words and your method will be called repeatedly ma 阅读全文
posted @ 2018-10-02 08:24 轻风舞动 阅读(1035) 评论(0) 推荐(0) 编辑
摘要: This is a follow up of Shortest Word Distance. The only difference is now word1 could be the same as word2. Given a list of words and two words word1 阅读全文
posted @ 2018-10-02 08:23 轻风舞动 阅读(609) 评论(0) 推荐(0) 编辑
摘要: Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. For example,Assume that words = 阅读全文
posted @ 2018-10-02 08:21 轻风舞动 阅读(782) 评论(0) 推荐(0) 编辑
摘要: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Note: The algorithm should run in linear time and in O(1) spa 阅读全文
posted @ 2018-10-02 08:03 轻风舞动 阅读(491) 评论(0) 推荐(0) 编辑
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2018-10-02 05:15 轻风舞动 阅读(1196) 评论(0) 推荐(0) 编辑
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2018-10-02 04:31 轻风舞动 阅读(585) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 50 下一页