01 2023 档案
摘要:A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk su
阅读全文
摘要:You are the manager of a basketball team. For the upcoming tournament, you want to choose the team with the highest overall score. The score of the te
阅读全文
摘要:A square matrix is said to be an X-Matrix if both of the following conditions hold: All the elements in the diagonals of the matrix are non-zero. All
阅读全文
摘要:You are given an integer array nums. You can choose exactly one index (0-indexed) and remove the element. Notice that the index of the elements may ch
阅读全文
摘要:Given an array of strings words (without duplicates), return all the concatenated words in the given list of words. A concatenated word is defined as
阅读全文
摘要:You are given an n x n integer matrix board where the cells are labeled from 1 to n2 in a Boustrophedon style starting from the bottom left of the boa
阅读全文
摘要:You are given two strings of the same length s1 and s2 and a string baseStr. We say s1[i] and s2[i] are equivalent characters. For example, if s1 = "a
阅读全文
摘要:There are n people in a social group labeled from 0 to n - 1. You are given an array logs where logs[i] = [timestampi, xi, yi] indicates that xi and y
阅读全文
摘要:You are given an array points where points[i] = [xi, yi] is the coordinates of the ith point on a 2D plane. Multiple points can have the same coordina
阅读全文
摘要:You are given a 0-indexed 2D integer array brackets where brackets[i] = [upperi, percenti] means that the ith tax bracket has an upper bound of upperi
阅读全文
摘要:In this problem, a tree is an undirected graph that is connected and has no cycles. You are given a graph that started as a tree with n nodes labeled
阅读全文
摘要:There is a 3 lane road of length n that consists of n + 1 points labeled from 0 to n. A frog starts at point 0 in the second lane and wants to jump to
阅读全文
摘要:Given a 2D grid consists of 0s (land) and 1s (water). An island is a maximal 4-directionally connected group of 0s and a closed island is an island to
阅读全文
摘要:You are given the logs for users' actions on LeetCode, and an integer k. The logs are represented by a 2D integer array logs where each logs[i] = [IDi
阅读全文
摘要:A password is said to be strong if it satisfies all the following criteria: It has at least 8 characters. It contains at least one lowercase letter. I
阅读全文
摘要:You are given a positive integer n, indicating that we initially have an n x n 0-indexed integer matrix mat filled with zeroes. You are also given a 2
阅读全文
摘要:You are given an array nums that consists of non-negative integers. Let us define rev(x) as the reverse of the non-negative integer x. For example, re
阅读全文
摘要:You are given two strings sentence1 and sentence2, each representing a sentence composed of words. A sentence is a list of words that are separated by
阅读全文
摘要:You are given a tree (i.e. a connected, undirected graph that has no cycles) rooted at node 0 consisting of n nodes numbered from 0 to n - 1. The tree
阅读全文
摘要:As the ruler of a kingdom, you have an army of wizards at your command. You are given a 0-indexed integer array strength, where strength[i] denotes th
阅读全文
摘要:You are given a tree (i.e. a connected, undirected graph that has no cycles) consisting of n nodes numbered from 0 to n - 1 and exactly n - 1 edges. T
阅读全文
摘要:You are given a string s that contains some bracket pairs, with each pair containing a non-empty key. For example, in the string "(name)is(age)yearsol
阅读全文
摘要:The variance of a string is defined as the largest difference between the number of occurrences of any 2 characters present in the string. Note the tw
阅读全文
摘要:Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane, return the maximum number of points that lie on the same stra
阅读全文
摘要:You are given a 0-indexed integer array nums representing the contents of a pile, where nums[0] is the topmost element of the pile. In one move, you c
阅读全文
摘要:It is a sweltering summer day, and a boy wants to buy some ice cream bars. At the store, there are n ice cream bars. You are given an array costs of l
阅读全文
摘要:You are given a 0-indexed array nums consisting of positive integers, representing targets on a number line. You are also given an integer space. You
阅读全文
摘要:You are given a 0-indexed integer array tasks, where tasks[i] represents the difficulty level of a task. In each round, you can complete either 2 or 3
阅读全文
摘要:You are given an array of positive integers price where price[i] denotes the price of the ith candy and a positive integer k. The store sells baskets
阅读全文
摘要:A sentence is a list of tokens separated by a single space with no leading or trailing spaces. Every token is either a positive number consisting of d
阅读全文

浙公网安备 33010602011771号