← back

Counting

173 questions · 0 seen

All Counting problems

Problems

169 Majority Element
229 Majority Element II
299 Bulls and Cows
347 Top K Frequent Elements
383 Ransom Note
387 First Unique Character in a String
451 Sort Characters By Frequency
594 Longest Harmonious Subsequence
621 Task Scheduler
692 Top K Frequent Words
767 Reorganize String
811 Subdomain Visit Count
819 Most Common Word
869 Reordered Power of 2
884 Uncommon Words from Two Sentences
900 RLE Iterator
914 X of a Kind in a Deck of Cards
923 3Sum With Multiplicity
945 Minimum Increment to Make Array Unique
992 Subarrays with K Different Integers
1010 Pairs of Songs With Total Durations Divisible by 60
1054 Distant Barcodes
1079 Letter Tile Possibilities
1090 Largest Values From Labels
1128 Number of Equivalent Domino Pairs
1160 Find Words That Can Be Formed by Characters
1189 Maximum Number of Balloons
1221 Split a String in Balanced Strings
1255 Maximum Score Words Formed by Letters
1267 Count Servers that Communicate
1347 Minimum Number of Steps to Make Two Strings Anagram
1356 Sort Integers by The Number of 1 Bits
1366 Rank Teams by Votes
1370 Increasing Decreasing String
1394 Find Lucky Integer in an Array
1399 Count Largest Group
1400 Construct K Palindrome Strings
1419 Minimum Number of Frogs Croaking
1481 Least Number of Unique Integers after K Removals
1497 Check If Array Pairs Are Divisible by k
1512 Number of Good Pairs
1519 Number of Nodes in the Sub-Tree With the Same Label (PRO)
1603 Design Parking System
1655 Distribute Repeating Integers
1657 Determine if Two Strings Are Close
1684 Count the Number of Consistent Strings (PRO)
1704 Determine if String Halves Are Alike
1726 Tuple with Same Product
1737 Change Minimum Characters to Satisfy One of Three Conditions
1742 Maximum Number of Balls in a Box
1748 Sum of Unique Elements (PRO)
1775 Equal Sum Arrays With Minimum Number of Operations
1781 Sum of Beauty of All Substrings (PRO)
1782 Count Pairs Of Nodes
1787 Make the XOR of All Segments Equal to Zero
1790 Check if One String Swap Can Make Strings Equal
1814 Count Nice Pairs in an Array (PRO)
1819 Number of Different Subsequences GCDs
1830 Minimum Number of Operations to Make String Sorted
1854 Maximum Population Year (PRO)
1857 Largest Color Value in a Directed Graph
1862 Sum of Floored Pairs
1876 Substrings of Size Three with Distinct Characters (PRO)
1897 Redistribute Characters to Make All Strings Equal
1941 Check if All Characters Have Equal Number of Occurrences (PRO)
1994 The Number of Good Subsets
2001 Number of Pairs of Interchangeable Rectangles
2006 Count Number of Pairs With Absolute Difference K
2013 Detect Squares
2014 Longest Subsequence Repeated k Times
2023 Number of Pairs of Strings With Concatenation Equal to Target
2025 Maximum Number of Ways to Partition an Array
2029 Stone Game IX
2048 Next Greater Numerically Balanced Number
2053 Kth Distinct String in an Array
2068 Check Whether Two Strings are Almost Equivalent
2085 Count Common Words With One Occurrence
2131 Longest Palindrome by Concatenating Two Letter Words
2148 Count Elements With Strictly Smaller and Greater Elements
2150 Find All Lonely Numbers in the Array
2170 Minimum Operations to Make the Array Alternating
2182 Construct String With Repeat Limit
2183 Count Array Pairs Divisible by K
2186 Minimum Number of Steps to Make Two Strings Anagram II
2190 Most Frequent Number Following Key In an Array
2206 Divide Array Into Equal Pairs
2225 Find Players With Zero or One Losses
2244 Minimum Rounds to Complete All Tasks
2248 Intersection of Multiple Arrays
2275 Largest Combination With Bitwise AND Greater Than Zero
2283 Check if Number Has Equal Digit Count and Digit Value
2284 Sender With Largest Word Count
2287 Rearrange Characters to Make Target String
2341 Maximum Number of Pairs in Array
2347 Best Poker Hand
2351 First Letter to Appear Twice
2364 Count Number of Bad Pairs
2384 Largest Palindromic Number
2404 Most Frequent Even Element
2416 Sum of Prefix Scores of Strings
2423 Remove Letter To Equalize Frequency
2442 Count Number of Distinct Integers After Reverse Operations
2453 Destroy Sequential Targets
2499 Minimum Total Cost to Make Arrays Unequal
2506 Count Pairs Of Similar Strings
2514 Count Anagrams
2526 Find Consecutive Integers from a Data Stream
2529 Maximum Count of Positive Integer and Negative Integer
2531 Make Number of Distinct Characters Equal (PRO)
2547 Minimum Cost to Split an Array
2586 Count the Number of Vowel Strings in Range
2748 Number of Beautiful Pairs
2833 Furthest Point From Origin
2856 Minimum Array Length After Pair Removals
2870 Minimum Number of Operations to Make Array Empty
2960 Count Tested Devices After Test Operations
2981 Find Longest Special Substring That Occurs Thrice I
2982 Find Longest Special Substring That Occurs Thrice II
3005 Count Elements With Maximum Frequency
3016 Minimum Number of Pushes to Type Word II
3035 Maximum Palindromes After Operations
3039 Apply Operations to Make String Empty
3044 Most Frequent Prime
3046 Split the Array
3071 Minimum Operations to Write the Letter Y on a Grid
3081 Replace Question Marks in String to Minimize Its Value
3084 Count Substrings Starting and Ending with Given Character
3085 Minimum Deletions to Make String K-Special
3128 Right Triangles
3137 Minimum Number of Operations to Make Word K-Periodic
3138 Minimum Length of Anagram Concatenation
3144 Minimum Substring Partition of Equal Character Frequency
3153 Sum of Digit Differences of All Pairs
3184 Count Pairs That Form a Complete Day I
3185 Count Pairs That Form a Complete Day II
3186 Maximum Total Damage With Spell Casting
3223 Minimum Length of String After Operations
3228 Maximum Number of Operations to Move Ones to the End (PRO)
3238 Find the Number of Winning Players
3265 Count Almost Equal Pairs I
3267 Count Almost Equal Pairs II
3312 Sorted GCD Pair Queries (PRO)
3335 Total Characters in String After Transformations I
3337 Total Characters in String After Transformations II
3371 Identify the Largest Outlier in an Array
3389 Minimum Operations to Make Character Frequencies Equal
3438 Find Valid Pair of Adjacent Digits in String
3442 Maximum Difference Between Even and Odd Frequency I (PRO)
3443 Maximum Manhattan Distance After K Changes (PRO)
3467 Transform Array by Parity
3518 Smallest Palindromic Rearrangement II
3527 Find the Most Common Response
3541 Find Most Frequent Vowel and Consonant
3545 Minimum Deletions for At Most K Distinct Characters
3583 Count Special Triplets
3591 Check if Any Element Has Prime Frequency
3636 Threshold Majority Queries
3659 Partition Array Into K-Distinct Groups
3663 Find The Least Frequent Digit
3664 Two-Letter Card Game
3679 Minimum Discards to Balance Inventory
3692 Majority Frequency Characters
3712 Sum of Elements With Frequency Divisible by K
3713 Longest Balanced Substring I
3715 Sum of Perfect Square Ancestors
3720 Lexicographically Smallest Permutation Greater Than Target
3737 Count Subarrays With Majority Element I
3746 Minimum String Length After Balanced Removals (PRO)
3785 Minimum Swaps to Avoid Forbidden Values
3805 Count Caesar Cipher Pairs
3839 Number of Prefix Connected Groups
3843 First Element with Unique Frequency
3848 Check Digitorial Permutation