摘要:
You have a list arr of all integers in the range [1, n] sorted in a strictly increasing order. Apply the following algorithm on arr: Starting from lef 阅读全文
摘要:
You are given a 0-indexed 1-dimensional (1D) integer array original, and two integers, m and n. You are tasked with creating a 2-dimensional (2D) arra 阅读全文
摘要:
今天刷了一题之后,LeetCode 官方给了我一个 2021 年的年度勋章以鼓励我今年超过 300 天有提交。 希望每个刷题的你都一起加油! 阅读全文
摘要:
Given a Tic-Tac-Toe board as a string array board, return true if and only if it is possible to reach this board position during the course of a valid 阅读全文
摘要:
Given an n x n grid containing only values 0 and 1, where 0 represents water and 1 represents land, find a water cell such that its distance to the ne 阅读全文
摘要:
You are starving and you want to eat food as quickly as possible. You want to find the shortest path to arrive at any food cell. You are given an m x 阅读全文
摘要:
Given an integer array nums and an integer k, modify the array in the following way: choose an index i and replace nums[i] with -nums[i]. You should a 阅读全文
摘要:
Given an array of integer arrays arrays where each arrays[i] is sorted in strictly increasing order, return an integer array representing the longest 阅读全文
摘要:
You are given an m x n binary matrix matrix. You can choose any number of columns in the matrix and flip every cell in that column (i.e., Change the v 阅读全文
摘要:
Design the CombinationIterator class: CombinationIterator(string characters, int combinationLength) Initializes the object with a string characters of 阅读全文
摘要:
In LeetCode Store, there are n items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or mo 阅读全文
摘要:
You are given the array paths, where paths[i] = [cityAi, cityBi] means there exists a direct path going from cityAi to cityBi. Return the destination 阅读全文
摘要:
Given an integer num, return a string representing its hexadecimal representation. For negative integers, two’s complement method is used. All the let 阅读全文
摘要:
Given a 0-indexed integer array nums, return true if it can be made strictly increasing after removing exactly one element, or false otherwise. If the 阅读全文
摘要:
Given the array prices where prices[i] is the price of the ith item in a shop. There is a special discount for items in the shop, if you buy the ith i 阅读全文
摘要:
There is only one character 'A' on the screen of a notepad. You can perform two operations on this notepad for each step: Copy All: You can copy all t 阅读全文
摘要:
Given the root of a binary search tree, return a balanced binary search tree with the same node values. If there is more than one answer, return any o 阅读全文
摘要:
Given a string s, reverse the string according to the following rules: All the characters that are not English letters remain in the same position. Al 阅读全文
摘要:
Given a string text, you want to use the characters of text to form as many instances of the word "balloon" as possible. You can use each character in 阅读全文
摘要:
You are given n points in the plane that are all distinct, where points[i] = [xi, yi]. A boomerang is a tuple of points (i, j, k) such that the distan 阅读全文