上一页 1 ··· 9 10 11 12 13 14 15 下一页
摘要: Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Subscribeto see which companies asked this question蛮简... 阅读全文
posted @ 2015-12-08 11:18 0giant 阅读(239) 评论(0) 推荐(0)
摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo... 阅读全文
posted @ 2015-12-07 11:30 0giant 阅读(244) 评论(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-12-05 22:05 0giant 阅读(171) 评论(0) 推荐(0)
摘要: Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to u... 阅读全文
posted @ 2015-12-03 17:15 0giant 阅读(165) 评论(0) 推荐(0)
摘要: Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.Credits:Special thanks to ... 阅读全文
posted @ 2015-11-29 15:39 0giant 阅读(156) 评论(0) 推荐(0)
摘要: Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2015-11-26 12:38 0giant 阅读(155) 评论(0) 推荐(0)
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo... 阅读全文
posted @ 2015-11-26 10:23 0giant 阅读(201) 评论(0) 推荐(0)
摘要: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for... 阅读全文
posted @ 2015-11-25 14:46 0giant 阅读(166) 评论(0) 推荐(0)
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For e... 阅读全文
posted @ 2015-11-25 10:53 0giant 阅读(183) 评论(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-11-23 19:20 0giant 阅读(151) 评论(0) 推荐(0)
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ... 阅读全文
posted @ 2015-11-23 13:58 0giant 阅读(219) 评论(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-11-23 11:08 0giant 阅读(175) 评论(0) 推荐(0)
摘要: Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front o... 阅读全文
posted @ 2015-11-22 22:03 0giant 阅读(205) 评论(0) 推荐(0)
摘要: Given an integer, write a function to determine if it is a power of two.Credits:Special thanks to @jianchao.li.fighter for adding this problem and cre... 阅读全文
posted @ 2015-11-22 22:01 0giant 阅读(158) 评论(0) 推荐(0)
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Subscribe... 阅读全文
posted @ 2015-11-22 16:55 0giant 阅读(126) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 下一页