There is a box protected by a password. The password is n digits, where each letter can be on…
标签:LeetCode题目解答
300. Longest Increasing Subsequence
Given an unsorted array of integers, find the length of longest increasing subsequence.Example: Input: [10,9,2…
[Leetcode] Implement Trie 实现前缀树
Implement Trie Implement a trie with insert, search, and startsWith methods. Note: You may assume that all inp…
力扣(LeetCode)21
题目地址:https://leetcode-cn.com/probl…题目描述:将两个有序链表合并为一个新的有序链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 解答:递归思想。若两者其中有一个为…
[LeetCode] Longest Absolute File Path 最长的绝对文件路径
Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir…
[LeetCode] Elimination Game 淘汰游戏
There is a list of sorted integers from 1 to n. Starting from left to right, remove the first numb…
[Leetcode] Minimum Size Subarray Sum 最短子串和
Minimum Size Subarray Sum Given an array of n positive integers and a positive integer s, find the minimal len…
53. Maximum Subarray
53. Maximum Subarray 题目 Find the contiguous subarray within an array (containing at least one number) which ha…
[LeetCode] Contains Duplicate III 包含重复值之三,Contains Duplicate II 包含重复值之二,Contains Duplicate II 包含重复值之二
Given an array of integers, find out whether there are two distinct indices i and j in the array such t…
[LeetCode] Best Time to Buy and Sell Stock with Transaction Fee 买股票的最佳时间含交易费
Your are given an array of integers prices, for which the i-th element is the price of a give…
LeetCode | Balanced Binary Tree
题目: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree i…
[LeetCode] Decode Ways II 解码方法之二
A message containing letters from A-Z is being encoded to numbers using the following mapping…