摘要:
17. Letter Combinations of a Phone Number Given a digit string, return all possible letter combinations that the number could represent. A mapping of 阅读全文
摘要:
46. Permutations Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3] 阅读全文
摘要:
284. Peeking Iterator Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the pe 阅读全文
摘要:
136. Single Number Given an array of integers, every element appears twice except for one. Find that single one. Your algorithm should have a linear r 阅读全文
摘要:
286. Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example, 阅读全文
摘要:
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
摘要:
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
摘要:
2. Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their node 阅读全文
摘要:
Given a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2 \ 3 \ 4 阅读全文