摘要: Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl... 阅读全文
posted @ 2015-08-13 10:47 李小橘er 阅读(163) 评论(0) 推荐(0)
摘要: Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl... 阅读全文
posted @ 2015-08-13 09:51 李小橘er 阅读(185) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth... 阅读全文
posted @ 2015-08-12 17:18 李小橘er 阅读(148) 评论(0) 推荐(0)
摘要: Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1 这道题呢=。=看着题目简介挺有意思的。哈哈哈。~说实话我真的很讨厌whit... 阅读全文
posted @ 2015-08-12 16:07 李小橘er 阅读(215) 评论(0) 推荐(0)
摘要: Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express... 阅读全文
posted @ 2015-08-12 11:35 李小橘er 阅读(192) 评论(0) 推荐(0)
摘要: Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文
posted @ 2015-08-12 09:59 李小橘er 阅读(161) 评论(0) 推荐(0)
摘要: Given acompletebinary tree, count the number of nodes.In a complete binary tree every level, except possibly the last, is completely filled, and all n... 阅读全文
posted @ 2015-08-12 09:43 李小橘er 阅读(263) 评论(0) 推荐(0)
摘要: Remove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6Return:1 --> 2 --> 3 --... 阅读全文
posted @ 2015-08-11 15:56 李小橘er 阅读(184) 评论(0) 推荐(0)
摘要: Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2015-08-11 14:23 李小橘er 阅读(205) 评论(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-11 11:14 李小橘er 阅读(194) 评论(0) 推荐(0)