上一页 1 2 3 4 5 6 7 ··· 27 下一页
摘要: Basic Calculator IIImplement a basic calculator to evaluate a simple expression string.The expression string contains onlynon-negativeintegers,+,-,*,/... 阅读全文
posted @ 2015-07-12 15:08 陆草纯 阅读(597) 评论(0) 推荐(0) 编辑
摘要: Invert Binary TreeInvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem w... 阅读全文
posted @ 2015-07-12 14:36 陆草纯 阅读(772) 评论(0) 推荐(0) 编辑
摘要: Implement Stack using QueuesImplement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the eleme... 阅读全文
posted @ 2015-07-12 11:19 陆草纯 阅读(1309) 评论(0) 推荐(0) 编辑
摘要: Basic CalculatorImplement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), t... 阅读全文
posted @ 2015-07-12 10:13 陆草纯 阅读(3177) 评论(1) 推荐(0) 编辑
摘要: Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.Ac... 阅读全文
posted @ 2015-07-11 16:46 陆草纯 阅读(1275) 评论(0) 推荐(0) 编辑
摘要: Rectangle AreaFind the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right co... 阅读全文
posted @ 2015-07-11 09:57 陆草纯 阅读(531) 评论(0) 推荐(0) 编辑
摘要: Palindrome Linked ListGiven a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?解法一:一次遍历,装入vec... 阅读全文
posted @ 2015-07-10 11:46 陆草纯 阅读(4552) 评论(0) 推荐(0) 编辑
摘要: Count Complete Tree NodesGiven acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary... 阅读全文
posted @ 2015-07-09 17:48 陆草纯 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Maximal SquareGiven 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 ... 阅读全文
posted @ 2015-07-09 10:53 陆草纯 阅读(611) 评论(0) 推荐(0) 编辑
摘要: Summary RangesGiven a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5",... 阅读全文
posted @ 2015-07-08 21:08 陆草纯 阅读(446) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 27 下一页