Given a string s, partition s such that every substring of the partition is a palindrome. Retur…
分类:LeetCode题目解答汇总
LeetCode | Unique Binary Search Trees(二叉搜索树的个数)
Given n, how many structurally unique BST’s (binary search trees) that store values 1R…
LeetCode | Rotate Image(旋转图像)
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (cl…
LeetCode | Merge Sorted Array(归并有序数组)
Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has e…
LeetCode | Plus One(数组表示的数字加1)
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored s…
LeetCode | Combinations(n选k全排列)
Given two integers n and k, return all possible combinations of k numbers out of 1 …
LeetCode | Word Ladder(单词梯)
Given two words (start and end), and a dictionary, find the length of shortest transformation sequen…
LeetCode | Search in Rotated Sorted Array(在旋转数组中查找)
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 migh…
LeetCode | Valid Palindrome(有效的回文串)
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. …
LeetCode | Remove Duplicates from Sorted List II(删除链表中重复结点2)
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numb…
LeetCode | Letter Combinations of a Phone Number(号码的字符串组合)
Given a digit string, return all possible letter combinations that the number could represent. A mapping of di…
LeetCode | Merge k Sorted Lists(归并k个链表)
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 将…