上一页 1 2 3 4 5 6 7 ··· 26 下一页
摘要: Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1/** * Definition for a binary tree node... 阅读全文
posted @ 2015-08-08 14:16 ~每天进步一点点~ 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()... 阅读全文
posted @ 2015-08-08 14:04 ~每天进步一点点~ 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or minus... 阅读全文
posted @ 2015-08-08 13:17 ~每天进步一点点~ 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right corner as shown ... 阅读全文
posted @ 2015-08-07 23:22 ~每天进步一点点~ 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Given acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary tree every level, except... 阅读全文
posted @ 2015-08-07 23:08 ~每天进步一点点~ 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matr... 阅读全文
posted @ 2015-08-07 20:12 ~每天进步一点点~ 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integerk, find out whether there there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and the d... 阅读全文
posted @ 2015-08-06 23:08 ~每天进步一点点~ 阅读(114) 评论(0) 推荐(0) 编辑
摘要: A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you aregiven... 阅读全文
posted @ 2015-08-06 22:57 ~每天进步一点点~ 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr... 阅读全文
posted @ 2015-08-06 22:12 ~每天进步一点点~ 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Find all possible combinations ofknumbers that add up to a numbern, given that only numbers from 1 to 9 can be used and each combination should be a u... 阅读全文
posted @ 2015-08-06 21:17 ~每天进步一点点~ 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 26 下一页