上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 77 下一页
摘要: [抄题]: A rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bottom-left corner, and (x2, y2) are the coordi 阅读全文
posted @ 2018-08-10 21:56 苗妙苗 阅读(209) 评论(0) 推荐(0)
摘要: [抄题]: Given a binary tree, return the values of its boundary in anti-clockwise direction starting from root. Boundary includes left boundary, leaves, 阅读全文
posted @ 2018-08-10 10:34 苗妙苗 阅读(213) 评论(0) 推荐(0)
摘要: [抄题]: Implement an iterator to flatten a 2d vector. Example: [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: j必须非空且有下才行j != null && 阅读全文
posted @ 2018-08-10 08:52 苗妙苗 阅读(201) 评论(0) 推荐(0)
摘要: [抄题]: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that y 阅读全文
posted @ 2018-08-09 17:47 苗妙苗 阅读(208) 评论(0) 推荐(0)
摘要: gas = [1,2,3,4,5], cost = [3,4,5,1,2]index =[0,1,2,3,4]//cost = index - 1 [抄题]: There are N gas stations along a circular route, where the amount of g 阅读全文
posted @ 2018-08-09 16:23 苗妙苗 阅读(291) 评论(0) 推荐(0)
摘要: [抄题]: Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node 阅读全文
posted @ 2018-08-09 15:26 苗妙苗 阅读(174) 评论(0) 推荐(0)
摘要: [抄题]: Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example: [暴力解法]: 时间分析: 空间分析: [优化后]: 时 阅读全文
posted @ 2018-08-08 17:19 苗妙苗 阅读(316) 评论(0) 推荐(0)
摘要: [抄题]: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertica 阅读全文
posted @ 2018-08-08 10:55 苗妙苗 阅读(323) 评论(0) 推荐(0)
摘要: [抄题]: 就是出现了多次的子树,可以只包括一个点。 Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root n 阅读全文
posted @ 2018-08-08 09:20 苗妙苗 阅读(186) 评论(0) 推荐(0)
摘要: [抄题]: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not 阅读全文
posted @ 2018-08-06 23:25 苗妙苗 阅读(302) 评论(0) 推荐(0)
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 77 下一页