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 阅读全文
posted @ 2022-11-30 06:32 CNoodle 阅读(95) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-29 12:41 CNoodle 阅读(138) 评论(0) 推荐(0)
摘要:You are given an integer array matches where matches[i] = [winneri, loseri] indicates that the player winneri defeated player loseri in a match. Retur 阅读全文
posted @ 2022-11-29 07:56 CNoodle 阅读(100) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-28 14:30 CNoodle 阅读(128) 评论(0) 推荐(0)
摘要:Sometimes people repeat letters to represent extra feeling. For example: "hello" -> "heeellooo" "hi" -> "hiiii" In these strings like "heeellooo", we 阅读全文
posted @ 2022-11-26 05:58 CNoodle 阅读(92) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-24 05:55 CNoodle 阅读(76) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-23 10:23 CNoodle 阅读(88) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-22 03:00 CNoodle 阅读(212) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-20 14:11 CNoodle 阅读(153) 评论(0) 推荐(0)
摘要: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, 阅读全文
posted @ 2022-11-19 14:55 CNoodle 阅读(74) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-19 14:36 CNoodle 阅读(65) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-15 14:24 CNoodle 阅读(117) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-08 11:27 CNoodle 阅读(136) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-08 00:33 CNoodle 阅读(102) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-07 07:12 CNoodle 阅读(73) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-05 05:44 CNoodle 阅读(153) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-03 15:00 CNoodle 阅读(127) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2022-11-01 01:46 CNoodle 阅读(114) 评论(0) 推荐(0)