11 2023 档案
摘要:You are given an integer array nums sorted in non-decreasing order. Build and return an integer array result with the same length as nums such that re
阅读全文
摘要:You are given a binary matrix matrix of size m x n, and you are allowed to rearrange the columns of the matrix in any order. Return the area of the la
阅读全文
摘要:Given a 2D integer array nums, return all elements of nums in diagonal order as shown in the below images. Example 1: Input: nums = [[1,2,3],[4,5,6],[
阅读全文
摘要:A sequence of numbers is called arithmetic if it consists of at least two elements, and the difference between every two consecutive elements is the s
阅读全文
摘要:Given a 0-indexed integer array nums of size n and two integers lower and upper, return the number of fair pairs. A pair (i, j) is fair if: 0 <= i < j
阅读全文
摘要:Given a 0-indexed integer array nums of length n and an integer target, return the number of pairs (i, j) where 0 <= i < j < n and nums[i] + nums[j] <
阅读全文
摘要:HTML entity parser is the parser that takes HTML code as input and replace all the entities of the special characters by the characters itself. The sp
阅读全文
摘要:A string s is called good if there are no two different characters in s that have the same frequency. Given a string s, return the minimum number of c
阅读全文
摘要:You are given a 0-indexed integer array nums. The array nums is beautiful if: nums.length is even. nums[i] != nums[i + 1] for all i % 2 == 0. Note tha
阅读全文
摘要:Given a 0-indexed string s, permute s to get a new string t such that: All consonants remain in their original places. More formally, if there is an i
阅读全文
摘要:There are n cities numbered from 0 to n-1. Given the array edges where edges[i] = [fromi, toi, weighti] represents a bidirectional and weighted edge b
阅读全文
摘要:You are given four integers sx, sy, fx, fy, and a non-negative integer t. In an infinite 2D grid, you start at the cell (sx, sy). Each second, you mus
阅读全文
摘要:You are given a binary string s consisting only of zeroes and ones. A substring of s is considered balanced if all zeroes are before ones and the numb
阅读全文
摘要:Given an integer array arr of distinct integers and an integer k. A game will be played between the first two elements of the array (i.e. arr[0] and a
阅读全文
摘要:You are given a 0-indexed integer array nums of even length consisting of an equal number of positive and negative integers. You should rearrange the
阅读全文
摘要:Given the root of a binary tree, return the number of nodes where the value of the node is equal to the average of the values in its subtree. Note: Th
阅读全文
摘要:Given a 0-indexed integer array nums, find a 0-indexed integer array answer where: answer.length == nums.length. answer[i] = |leftSum[i] - rightSum[i]
阅读全文

浙公网安备 33010602011771号