上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 33 下一页
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ 阅读全文
posted @ 2020-03-10 09:44 xuan_abc 阅读(118) 评论(0) 推荐(0)
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2020-03-09 20:53 xuan_abc 阅读(126) 评论(0) 推荐(0)
摘要: Given a 2D array representing the coordinates on the map, there are only values 0, 1, 2 on the map. value 0 means that it can pass, value 1 means not 阅读全文
posted @ 2020-03-09 04:37 xuan_abc 阅读(254) 评论(0) 推荐(0)
摘要: You have a pointer at index 00 in an array of size arrLenarrLen. At each step, you can move 11 position to the left, 11 position to the right in the a 阅读全文
posted @ 2020-03-08 23:54 xuan_abc 阅读(211) 评论(0) 推荐(0)
摘要: Given a binary tree in which each node contains an integer number. Find the maximum possible subpath sum(both the starting and ending node of the subp 阅读全文
posted @ 2020-03-06 12:51 xuan_abc 阅读(93) 评论(0) 推荐(0)
摘要: Given a binary tree in which each node contains an integer number. Determine if there exists a path (the path can only be from one node to itself or t 阅读全文
posted @ 2020-03-05 23:00 xuan_abc 阅读(177) 评论(0) 推荐(0)
摘要: Given a binary tree, find the subtree with maximum average. Return the root of the subtree. Example 1 Input: {1,-5,11,1,2,4,-2} Output:11 Explanation: 阅读全文
posted @ 2020-03-05 11:52 xuan_abc 阅读(238) 评论(0) 推荐(0)
摘要: Given a binary tree, find the subtree with minimum sum. Return the root of the subtree. Example Example 1: Input: {1,-5,2,1,2,-4,-5} Output:1 Explanat 阅读全文
posted @ 2020-03-04 21:23 xuan_abc 阅读(159) 评论(0) 推荐(0)
摘要: Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the thr 阅读全文
posted @ 2020-03-04 11:41 xuan_abc 阅读(102) 评论(0) 推荐(0)
摘要: Find all pairs of elements in a given array that sum to the pair the given target number. Return all the distinct pairs of values. Assumptions The giv 阅读全文
posted @ 2020-03-04 10:23 xuan_abc 阅读(255) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 33 下一页