上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 ->... 阅读全文
posted @ 2015-07-15 12:35 lilixu 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ... 阅读全文
posted @ 2015-07-14 15:06 lilixu 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to thedefinition of LCA on Wikipedia: “The lowest ... 阅读全文
posted @ 2015-07-13 10:04 lilixu 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Write a SQL query to get the second highest salary from theEmployeetable.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 || ... 阅读全文
posted @ 2015-07-12 10:50 lilixu 阅读(796) 评论(0) 推荐(0) 编辑
摘要: Given a collection of integers that might contain duplicates,nums, return all possible subsets.Note:Elements in a subset must be in non-descending ord... 阅读全文
posted @ 2015-07-12 10:17 lilixu 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers,nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not... 阅读全文
posted @ 2015-07-12 09:29 lilixu 阅读(331) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on Wikipedia: ... 阅读全文
posted @ 2015-07-11 09:40 lilixu 阅读(371) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? O(n)空间:存成数组后比较 class Solution: # @ 阅读全文
posted @ 2015-07-10 10:18 lilixu 阅读(364) 评论(0) 推荐(0) 编辑
摘要: Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.A number multiplied by10will ... 阅读全文
posted @ 2015-07-09 09:48 lilixu 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 ... 阅读全文
posted @ 2015-07-08 21:46 lilixu 阅读(128) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页