03 2018 档案
LeetCode解题报告—— Reverse Linked List II & Restore IP Addresses & Unique Binary Search Trees II
摘要: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
阅读全文
LeetCode解题报告—— Word Search & Subsets II & Decode Ways
摘要: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
阅读全文
LeetCode解题报告—— Rotate List & Set Matrix Zeroes & Sort Colors
摘要:1. Rotate List Given a list, rotate the list to the right by k places, where k is non-negative. Example: 思路:这题感觉有点没有说清楚,如果k大于了链表长度该怎么办呢?这个时候怎么确定旋转位置呢?
阅读全文
LeetCode解题报告—— Jump Game & Merge Intervals & Permutation Sequence
摘要: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
阅读全文
LeetCode解题报告—— Group Anagrams & Pow(x, n) & Spiral Matrix
摘要:1. Group Anagrams Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Note: All inputs
阅读全文
LeetCode解题报告—— Permutations & Permutations II & Rotate Image
摘要:1. Permutations Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: 思路;直接使用
阅读全文