上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页
摘要: Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printed in t 阅读全文
posted @ 2019-12-09 00:44 xuan_abc 阅读(147) 评论(0) 推荐(0)
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1] sumR 阅读全文
posted @ 2019-12-08 23:26 xuan_abc 阅读(129) 评论(0) 推荐(0)
摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2019-12-08 12:38 xuan_abc 阅读(222) 评论(0) 推荐(0)
摘要: Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) can search a literal word or a r 阅读全文
posted @ 2019-12-08 12:00 xuan_abc 阅读(397) 评论(0) 推荐(0)
摘要: There is a ball in a maze with empty spaces and walls. The ball can go through empty spaces by rolling up, down, left or right, but it won't stop roll 阅读全文
posted @ 2019-12-08 06:51 xuan_abc 阅读(203) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2019-12-07 23:53 xuan_abc 阅读(96) 评论(0) 推荐(0)
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2019-12-07 23:27 xuan_abc 阅读(97) 评论(0) 推荐(0)
摘要: Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] 阅读全文
posted @ 2019-12-07 12:12 xuan_abc 阅读(119) 评论(0) 推荐(0)
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example 阅读全文
posted @ 2019-12-07 11:21 xuan_abc 阅读(237) 评论(0) 推荐(0)
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2019-12-07 10:36 xuan_abc 阅读(77) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页