上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 76 下一页
摘要: Convert a non negative integer to its english words representation. Given input is guaranteed to be less than 231 1. Example 1: Input: 123 Output: "On 阅读全文
posted @ 2018-11-30 15:18 bernieloveslife 阅读(90) 评论(0) 推荐(0)
摘要: Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? No extra space solution: 阅读全文
posted @ 2018-11-30 15:18 bernieloveslife 阅读(80) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. Example: Input: 1 2 3 4 5 NULL Output: 5 4 3 2 1 NULL Follow up: A linked list can be reversed either iteratively or rec 阅读全文
posted @ 2018-11-30 15:18 bernieloveslife 阅读(73) 评论(0) 推荐(0)
摘要: Given a linked list, rotate the list to the right by k places, where k is non negative. Example 1: Input: 1 2 3 4 5 NULL, k = 2 Output: 4 5 1 2 3 NULL 阅读全文
posted @ 2018-11-30 15:18 bernieloveslife 阅读(79) 评论(0) 推荐(0)
摘要: Given an absolute path for a file (Unix style), simplify it. For example, path = "/home/", = "/home" path = "/a/./b/../../c/", = "/c" path = "/a/../.. 阅读全文
posted @ 2018-11-30 15:18 bernieloveslife 阅读(102) 评论(0) 推荐(0)
摘要: Let's call an array A a mountain if the following properties hold: A.length = 3 There exists some 0 A[i+1] ... A[A.length 1] Given an array that is de 阅读全文
posted @ 2018-11-30 15:18 bernieloveslife 阅读(97) 评论(0) 推荐(0)
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2018-11-30 15:18 bernieloveslife 阅读(125) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). F 阅读全文
posted @ 2018-11-30 15:17 bernieloveslife 阅读(100) 评论(0) 推荐(0)
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) Push element x onto stack. pop() Removes the 阅读全文
posted @ 2018-11-30 15:17 bernieloveslife 阅读(96) 评论(0) 推荐(0)
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: Input: 3 Output: 5 Explanation: Given n = 3, the 阅读全文
posted @ 2018-11-30 15:17 bernieloveslife 阅读(107) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 76 下一页