Counting | LeetCode Problems

113 Counting solutions to LeetCode solutions.

Counting Problems View all solutions →

Majority Element

#169 Easy

Majority Element II

#229 Medium

Bulls and Cows

#299 Medium

Top K Frequent Elements

#347 Medium

Ransom Note

#383 Easy

First Unique Character in a String

#387 Easy

Sort Characters By Frequency

#451 Medium

Longest Harmonious Subsequence

#594 Easy

Task Scheduler

#621 Medium

Top K Frequent Words

#692 Medium

Reorganize String

#767 Medium

Subdomain Visit Count

#811 Medium

Most Common Word

#819 Easy

Reordered Power of 2

#869 Medium

Uncommon Words from Two Sentences

#884 Easy

RLE Iterator

#900 Medium

X of a Kind in a Deck of Cards

#914 Medium

3Sum With Multiplicity

#923 Medium

Minimum Increment to Make Array Unique

#945 Medium

Subarrays with K Different Integers

#992 Hard

Pairs of Songs With Total Durations Divisible by 60

#1010 Medium

Distant Barcodes

#1054 Medium

Letter Tile Possibilities

#1079 Medium

Largest Values From Labels

#1090 Medium

Number of Equivalent Domino Pairs

#1128 Easy

Find Words That Can Be Formed by Characters

#1160 Easy

Maximum Number of Balloons

#1189 Easy

Split a String in Balanced Strings

#1221 Easy

Count Servers that Communicate

#1267 Medium

Minimum Number of Steps to Make Two Strings Anagram

#1347 Medium

Sort Integers by The Number of 1 Bits

#1356 Easy

Rank Teams by Votes

#1366 Medium

Increasing Decreasing String

#1370 Easy

Find Lucky Integer in an Array

#1394 Easy

Construct K Palindrome Strings

#1400 Medium

Minimum Number of Frogs Croaking

#1419 Medium

Least Number of Unique Integers after K Removals

#1481 Medium

Check If Array Pairs Are Divisible by k

#1497 Medium

Number of Good Pairs

#1512 Easy

Number of Nodes in the Sub-Tree With the Same Label

#1519 Medium

Design Parking System

#1603 Easy

Determine if Two Strings Are Close

#1657 Medium

Count the Number of Consistent Strings

#1684 Easy

Determine if String Halves Are Alike

#1704 Easy

Tuple with Same Product

#1726 Medium

Change Minimum Characters to Satisfy One of Three Conditions

#1737 Medium

Maximum Number of Balls in a Box

#1742 Easy

Sum of Unique Elements

#1748 Easy

Equal Sum Arrays With Minimum Number of Operations

#1775 Medium

Sum of Beauty of All Substrings

#1781 Medium

Check if One String Swap Can Make Strings Equal

#1790 Easy

Count Nice Pairs in an Array

#1814 Medium

Number of Different Subsequences GCDs

#1819 Hard

Maximum Population Year

#1854 Easy

Largest Color Value in a Directed Graph

#1857 Hard

Substrings of Size Three with Distinct Characters

#1876 Easy

Redistribute Characters to Make All Strings Equal

#1897 Easy

Check if All Characters Have Equal Number of Occurrences

#1941 Easy

Number of Pairs of Interchangeable Rectangles

#2001 Medium

Count Number of Pairs With Absolute Difference K

#2006 Easy

Detect Squares

#2013 Medium

Longest Subsequence Repeated k Times

#2014 Hard

Number of Pairs of Strings With Concatenation Equal to Target

#2023 Medium

Maximum Number of Ways to Partition an Array

#2025 Hard

Stone Game IX

#2029 Medium

Next Greater Numerically Balanced Number

#2048 Medium

Kth Distinct String in an Array

#2053 Medium

Check Whether Two Strings are Almost Equivalent

#2068 Easy

Count Common Words With One Occurrence

#2085 Easy

Longest Palindrome by Concatenating Two Letter Words

#2131 Medium

Count Elements With Strictly Smaller and Greater Elements

#2148 Easy

Find All Lonely Numbers in the Array

#2150 Medium

Minimum Operations to Make the Array Alternating

#2170 Medium

Minimum Number of Steps to Make Two Strings Anagram II

#2186 Medium

Most Frequent Number Following Key In an Array

#2190 Easy

Divide Array Into Equal Pairs

#2206 Easy

Find Players With Zero or One Losses

#2225 Medium

Minimum Rounds to Complete All Tasks

#2244 Medium

Intersection of Multiple Arrays

#2248 Easy

Largest Combination With Bitwise AND Greater Than Zero

#2275 Medium

Check if Number Has Equal Digit Count and Digit Value

#2283 Easy

Sender With Largest Word Count

#2284 Medium

Rearrange Characters to Make Target String

#2287 Easy

Maximum Number of Pairs in Array

#2341 Easy

Best Poker Hand

#2347 Easy

First Letter to Appear Twice

#2351 Easy

Count Number of Bad Pairs

#2364 Medium

Most Frequent Even Element

#2404 Easy

Sum of Prefix Scores of Strings

#2416 Hard

Count Number of Distinct Integers After Reverse Operations

#2442 Medium

Destroy Sequential Targets

#2453 Medium

Minimum Total Cost to Make Arrays Unequal

#2499 Hard

Count Pairs Of Similar Strings

#2506 Easy

Maximum Count of Positive Integer and Negative Integer

#2529 Easy

Minimum Cost to Split an Array

#2547 Hard

Count the Number of Vowel Strings in Range

#2586 Easy

Number of Beautiful Pairs

#2748 Easy

Furthest Point From Origin

#2833 Easy

Minimum Number of Operations to Make Array Empty

#2870 Medium

Count Tested Devices After Test Operations

#2960 Easy

Find Longest Special Substring That Occurs Thrice I

#2981 Medium

Count Elements With Maximum Frequency

#3005 Easy

Minimum Number of Pushes to Type Word II

#3016 Medium

Maximum Palindromes After Operations

#3035 Medium

Apply Operations to Make String Empty

#3039 Medium

Most Frequent Prime

#3044 Medium

Split the Array

#3046 Easy

Minimum Operations to Write the Letter Y on a Grid

#3071 Medium

Count Substrings Starting and Ending with Given Character

#3084 Medium

Minimum Deletions to Make String K-Special

#3085 Medium

Minimum Length of String After Operations

#3223 Medium

Total Characters in String After Transformations I

#3335 Medium

Total Characters in String After Transformations II

#3337 Hard