04 2023 档案
摘要:There are three stones in different positions on the X-axis. You are given three integers a, b, and c, the positions of the stones. In one move, you p
阅读全文
摘要:Given an integer array nums and two integers firstLen and secondLen, return the maximum sum of elements in two non-overlapping subarrays with lengths
阅读全文
摘要:You have a set which contains all positive integers [1, 2, 3, 4, 5, ...]. Implement the SmallestInfiniteSet class: SmallestInfiniteSet() Initializes t
阅读全文
摘要:You are given an array of strings names, and an array heights that consists of distinct positive integers. Both arrays are of length n. For each index
阅读全文
摘要:You are given the root of a binary tree. A ZigZag path for a binary tree is defined as follow: Choose any node in the binary tree and a direction (rig
阅读全文
摘要:You have n gardens, labeled from 1 to n, and an array paths where paths[i] = [xi, yi] describes a bidirectional path between garden xi to garden yi. I
阅读全文
摘要:You are given a string s, which contains stars *. In one operation, you can: Choose a star in s. Remove the closest non-star character to its left, as
阅读全文
摘要:Given a string s, partition the string into one or more substrings such that the characters in each substring are unique. That is, no letter appears i
阅读全文
摘要:You are given two positive integer arrays spells and potions, of length n and m respectively, where spells[i] represents the strength of the ith spell
阅读全文

浙公网安备 33010602011771号