上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 54 下一页
摘要: A group of friends went on holiday and sometimes lent each other money. For example, Alice paid for Bill's lunch for $10. Then later Chris gave Alice 阅读全文
posted @ 2019-06-16 01:31 北叶青藤 阅读(343) 评论(0) 推荐(0)
摘要: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde 阅读全文
posted @ 2019-06-09 11:45 北叶青藤 阅读(135) 评论(0) 推荐(0)
摘要: Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the pers 阅读全文
posted @ 2019-06-09 11:17 北叶青藤 阅读(148) 评论(0) 推荐(0)
摘要: Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the or 阅读全文
posted @ 2019-06-09 10:37 北叶青藤 阅读(130) 评论(0) 推荐(0)
摘要: Given a time represented in the format "HH:MM", form the next closest time by reusing the current digits. There is no limit on how many times a digit 阅读全文
posted @ 2019-05-28 07:27 北叶青藤 阅读(276) 评论(0) 推荐(0)
摘要: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe 阅读全文
posted @ 2019-05-20 01:39 北叶青藤 阅读(243) 评论(0) 推荐(0)
摘要: Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all 阅读全文
posted @ 2019-05-06 00:31 北叶青藤 阅读(414) 评论(0) 推荐(0)
摘要: Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2019-05-06 00:11 北叶青藤 阅读(301) 评论(0) 推荐(0)
摘要: Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element. We define an array is non-decr 阅读全文
posted @ 2019-04-29 13:19 北叶青藤 阅读(190) 评论(0) 推荐(0)
摘要: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文
posted @ 2019-04-28 12:46 北叶青藤 阅读(214) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 54 下一页