摘要:
先占坑。以后再修改 昨天遇到一道题, Given int Rand(1) = 0或者 1- uniformly distributed, write a function to implement Rand(29) - uniformly distributed。 由于本科时概率没学好,挂了。回来网 阅读全文
摘要:
题目: Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, re 阅读全文
摘要:
题目: Implement a trie with insert, search, and startsWith methods. 链接: http://leetcode.com/problems/implement-trie-prefix-tree/ 题解: 设计Trie。题目给了很多条件,所以大 阅读全文
摘要:
题目: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you ha 阅读全文
摘要:
题目: Reverse a singly linked list. 链接: http://leetcode.com/problems/reverse-linked-list/ 题解: 反转单链表,必须做得非常熟练。这个method将会是许多复杂题目的一个组成部分。 Time Complexity - 阅读全文
摘要:
题目: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occur 阅读全文
摘要:
题目: Description: Count the number of prime numbers less than a non-negative number, n. Credits:Special thanks to @mithmatt for adding this problem and 阅读全文
摘要:
题目: Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 阅读全文
摘要:
题目: Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range 阅读全文
摘要:
题目: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For 阅读全文