04 2021 档案
摘要:Description: Given two binary strings a and b, return their sum as a binary string. Link: 67. Add Binary Examples: Example 1: Input: a = "11", b = "1"
阅读全文
摘要:Description: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after ra
阅读全文
摘要:Description: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the c
阅读全文
摘要:Description: Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where
阅读全文
摘要:Description: There are a total of n courses you have to take labelled from 0 to n - 1. Some courses may have prerequisites, for example, if prerequisi
阅读全文
摘要:Description: There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where pr
阅读全文
摘要:Description: Given the root of a binary tree, return all root-to-leaf paths in any order. A leaf is a node with no children. Link: 257. Binary Tree Pa
阅读全文
摘要:Description: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of
阅读全文
摘要:Description: Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string
阅读全文
摘要:Description: Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty stri
阅读全文
摘要:Description: Given an array of non-negative integers nums, you are initially positioned at the first index of the array. Each element in the array rep
阅读全文
摘要:Description: Given an integer array nums, return the length of the longest strictly increasing subsequence. A subsequence is a sequence that can be de
阅读全文
摘要:Description:You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails t
阅读全文
摘要:Description: Given the root of a complete binary tree, return the number of the nodes in the tree. According to Wikipedia, every level, except possibl
阅读全文
摘要:Description: Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive. There is only one repeated
阅读全文
摘要:Description: Given an array of positive integers nums and a positive integer target, return the minimal length of a contiguous subarray [numsl, numsl+
阅读全文
摘要:Description: Given the root of a binary search tree, and an integer k, return the kth (1-indexed) smallest element in the tree. Link: 230. Kth Smalles
阅读全文
摘要:Description: A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a peak element, and return it
阅读全文
摘要:Description: Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,4,4,5,6,7] mi
阅读全文
摘要:Description: Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] mi
阅读全文
摘要:Description: There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values). Before being passed to your functio
阅读全文
摘要:Description: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row
阅读全文
摘要:Description: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. If target is no
阅读全文
摘要:Description: Given two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator. Return the quotien
阅读全文
摘要:Description: There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is rotated
阅读全文
摘要:Description: You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing
阅读全文
摘要:Description: Given a triangle array, return the minimum path sum from top to bottom. For each step, you may move to an adjacent number of the row belo
阅读全文
摘要:Description: Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length. Do not all
阅读全文
摘要:Description: Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same. If poss
阅读全文
摘要:Description:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a
阅读全文
摘要:Description: Given a string s and a string array dictionary, return the longest string in the dictionary that can be formed by deleting some of the gi
阅读全文
摘要:Description: There are some spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of t
阅读全文
摘要:Description: Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as
阅读全文

浙公网安备 33010602011771号