上一页 1 2 3 4 5 6 7 8 9 ··· 29 下一页
摘要: 496. Next Greater Element IYou are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next 阅读全文
posted @ 2018-09-18 09:32 jasminemzy 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any oneof them.Two t 阅读全文
posted @ 2018-09-18 08:33 jasminemzy 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 54. Spiral MatrixGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.Example 1:Input:[ [1, 2, 3, 4 阅读全文
posted @ 2018-09-18 06:58 jasminemzy 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ... n. DFS.函数头:private List<TreeNode> dfs(int sta 阅读全文
posted @ 2018-09-18 06:13 jasminemzy 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n?Example:Input: 3Output: 5Explanation:Given n = 3, there ar 阅读全文
posted @ 2018-09-18 05:35 jasminemzy 阅读(130) 评论(0) 推荐(0) 编辑
摘要: There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w.Now given all the cities and fights, together 阅读全文
posted @ 2018-09-18 05:04 jasminemzy 阅读(241) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another ex 阅读全文
posted @ 2018-09-18 02:11 jasminemzy 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Compare two version numbers version1 and version2.If version1 > version2 return 1; if version1 < version2 return -1;otherwise return 0.You may assume 阅读全文
posted @ 2018-09-18 01:37 jasminemzy 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wait until a warmer temp 阅读全文
posted @ 2018-09-18 01:06 jasminemzy 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.Example 1:Inpu 阅读全文
posted @ 2018-09-17 14:44 jasminemzy 阅读(190) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 29 下一页