摘要:
1. Unique Binary Search Trees Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, ther 阅读全文
摘要:
1. Reverse Linked List II Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and 阅读全文
摘要:
1. Word Search Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cel 阅读全文
摘要:
1. Rotate List Given a list, rotate the list to the right by k places, where k is non-negative. Example: 思路:这题感觉有点没有说清楚,如果k大于了链表长度该怎么办呢?这个时候怎么确定旋转位置呢? 阅读全文
摘要:
1. Jump Game Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represen 阅读全文
摘要:
1. Group Anagrams Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Note: All inputs 阅读全文
摘要:
1. Permutations Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: 思路;直接使用 阅读全文
摘要:
1. Combination Sum Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the cand 阅读全文
摘要:
1. Search in Rotated Sorted Array Suppose an array sorted in ascending order is rotated(轮流,循环) at some pivot(枢轴; 中心点) unknown to you beforehand(提前; 事先 阅读全文
摘要:
1. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the li 阅读全文