Given a set of words (without duplicates), find all word squares you can build from them…
分类:LeetCode题目解答
[LeetCode] All Paths From Source to Target 从起点到目标点到所有路径
Given a directed, acyclic graph of N nodes. Find all possible paths from node 0&nb…
LeetCode 290 Word Pattern
题目描述 Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, s…
[LeetCode] Spiral Matrix II 螺旋矩阵之二
Given a positive integer n, generate a square matrix filled with elements from 1 to n2 i…
[LeetCode] Nim Game 尼姆游戏
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each t…
[LeetCode] Longest Increasing Subsequence 最长递增子序列,Longest Increasing Subsequence 最长递增子序列,Longest Increasing Subsequence 最长递增子序列
Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input:…
[LeetCode] Remove Duplicate Letters 移除重复字母
Given a string which contains only lowercase letters, remove duplicate letters so that every letter app…
LeetCode | Subsets II
题目: Given a collection of integers that might contain duplicates, S, return all possible subsets. Note: E…
[LeetCode] Reverse Bits 翻转位, Grey Code
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in bin…
[LeetCode] Design Tic-Tac-Toe 设计井字棋游戏
Design a Tic-tac-toe game that is played between two players on a n x n grid. You may assume the follow…
[LeetCode] Encode String with Shortest Length 最短长度编码字符串
Given a non-empty string, encode the string such that its encoded length is the shortest. The encoding …
[LeetCode] Arithmetic Slices II - Subsequence 算数切片之二 - 子序列
A sequence of numbers is called arithmetic if it consists of at least three elements and if the differe…