Generate Parentheses 最新更新请见:https://yanjia.me/zh/2019/01/… Given n pairs of parentheses, write a functio…
分类:LeetCode题目解答
力扣(LeetCode)141
题目地址:https://leetcode-cn.com/probl…给定一个链表,判断链表中是否有环。 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)。 如…
[Leetcode] Longest Palindromic Substring 最长回文子字符串
Longest Palindromic Substring Given a string S, find the longest palindromic substring in S. You may assume th…
[LeetCode] Range Sum Query - Immutable 区域和检索 - 不可变
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. E…
[LeetCode] Predict the Winner 预测赢家
Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either …
LeetCode | Generate Parentheses
题目: Given n pairs of parentheses, write a function to generate all combinations of well-formed paren…
[Leetcode] Number of Islands 岛屿个数
Number of Islands 最新更新的思路,以及题II的解法请访问:https://yanjia.me/zh/2018/11/… Given a 2d grid map of ‘1R…
[LeetCode] K Inverse Pairs Array K个翻转对数组
Given two integers n and k, find how many different arrays consist of numbers from …
[LeetCode] Transform to Chessboard 转为棋盘
An N x N board contains only 0s and 1s. In each move, you can swap any 2 rows with …
[LeetCode] Number of Matching Subsequences 匹配的子序列的个数
Given string S and a dictionary of words words, find the number of words[i]&nb…
LeetCode 189 Rotate Array
题目描述 Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,…
LeetCode 079 Word Search
题目描述 Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letter…