11 2022 档案
摘要:Given an array of integers arr, return true if the number of occurrences of each value in the array is unique, or false otherwise. Example 1: Input: a
阅读全文
摘要:You are given a string s consisting only of the characters '0' and '1'. In one operation, you can change any '0' to '1' or vice versa. The string is c
阅读全文
摘要:You are given an integer array matches where matches[i] = [winneri, loseri] indicates that the player winneri defeated player loseri in a match. Retur
阅读全文
摘要:Given an array nums, return true if the array was originally sorted in non-decreasing order, then rotated some number of positions (including zero). O
阅读全文
摘要:Sometimes people repeat letters to represent extra feeling. For example: "hello" -> "heeellooo" "hi" -> "hiiii" In these strings like "heeellooo", we
阅读全文
摘要:Given an integer array nums and two integers left and right, return the number of contiguous non-empty subarrays such that the value of the maximum ar
阅读全文
摘要:An n x n matrix is valid if every row and every column contains all the integers from 1 to n (inclusive). Given an n x n integer matrix matrix, return
阅读全文
摘要:You are given an m x n matrix maze (0-indexed) with empty cells (represented as '.') and walls (represented as '+'). You are also given the entrance o
阅读全文
摘要:You are given a 0-indexed integer array nums, where nums[i] is a digit between 0 and 9 (inclusive). The triangular sum of nums is the value of the onl
阅读全文
摘要:Given an array nums of integers and integer k, return the maximum sum such that there exists i < j with nums[i] + nums[j] = sum and sum < k. If no i,
阅读全文
摘要:The width of a sequence is the difference between the maximum and minimum elements in the sequence. Given an array of integers nums, return the sum of
阅读全文
摘要:On a 2D plane, we place n stones at some integer coordinate points. Each coordinate point may have at most one stone. A stone can be removed if it sha
阅读全文
摘要:Given a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where
阅读全文
摘要:You are given a positive integer num consisting only of digits 6 and 9. Return the maximum number you can get by changing at most one digit (6 becomes
阅读全文
摘要:You own a Goal Parser that can interpret a string command. The command consists of an alphabet of "G", "()" and/or "(al)" in some order. The Goal Pars
阅读全文
摘要:You are given an array of strings words. Each element of words consists of two lowercase English letters. Create the longest possible palindrome by se
阅读全文
摘要:For a string sequence, a string word is k-repeating if word concatenated k times is a substring of sequence. The word's maximum k-repeating value is t
阅读全文
摘要:You are given an m x n integer matrix grid where each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right from and to an e
阅读全文

浙公网安备 33010602011771号