随笔分类 - LeetCode
摘要:Count Binary Palindromic Numbers You are given a non-negative integer n. A non-negative integer is called binary-palindromic if its binary representat
阅读全文
摘要:Minimum Operations to Equalize Binary String You are given a binary string s, and an integer k. In one operation, you must choose exactly k different
阅读全文
摘要:Two-Letter Card Game You are given a deck of cards represented by a string array cards, and each card displays two lowercase letters. You are also giv
阅读全文
摘要:Count the Number of Arrays with K Matching Adjacent Elements You are given three integers n, m, k. A good array arr of size n is defined as follows: E
阅读全文
摘要:Path Existence Queries in a Graph II You are given an integer n representing the number of nodes in a graph, labeled from 0 to n - 1. You are also giv
阅读全文
摘要:Find X Value of Array II You are given an array of positive integers nums and a positive integer k. You are also given a 2D array queries, where queri
阅读全文
摘要:Maximum Product of Subsequences With an Alternating Sum Equal to K You are given an integer array nums and two integers, k and limit. Your task is to
阅读全文
摘要:Check If Digits Are Equal in String After Operations II You are given a string s consisting of digits. Perform the following operation repeatedly unti
阅读全文
摘要:Maximum Difference Between Even and Odd Frequency II You are given a string s and an integer k. Your task is to find the maximum difference between th
阅读全文
摘要:Minimum Operations to Make Character Frequencies Equal You are given a string s. A string t is called good if all characters of t occur the same numbe
阅读全文
摘要:Maximum Area Rectangle With Point Constraints II There are n points on an infinite plane. You are given two integer arrays xCoord and yCoord where (xC
阅读全文
摘要:Find Products of Elements of Big Array A powerful array for an integer x is the shortest sorted array of powers of two that sum up to x. For example,
阅读全文
摘要:Find All Possible Stable Binary Arrays II You are given 3 positive integers zero, one, and limit. A binary array arr is called stable if: The number o
阅读全文
摘要:Count Valid Paths in a Tree There is an undirected tree with n nodes labeled from 1 to n. You are given the integer n and a 2D integer array edges of
阅读全文
摘要:Minimize OR of Remaining Elements Using Operations You are given a 0-indexed integer array nums and an integer k. In one operation, you can pick any i
阅读全文
摘要:Count Beautiful Substrings II You are given a string s and a positive integer k. Let vowels and consonants be the number of vowels and consonants in a
阅读全文
摘要:Make Lexicographically Smallest Array by Swapping Elements You are given a 0-indexed array of positive integers nums and a positive integer limit. In
阅读全文
摘要:Minimum Changes to Make K Semi-palindromes Given a string s and an integer k, partition s into k substrings such that the sum of the number of letter
阅读全文
摘要:Count of Sub-Multisets With Bounded Sum You are given a 0-indexed array nums of non-negative integers, and two integers l and r. Return the count of s
阅读全文
摘要:String Transformation You are given two strings s and t of equal length n. You can perform the following operation on the string s: Remove a suffix of
阅读全文

浙公网安备 33010602011771号