Home
Roadmaps
DSA Sheet
Contest Tracker
Articles
Curated Problem Set

Conquer Searching Problems

Master fundamental data structures and algorithms. Track your progress, solve curated problems, and prepare for your next big technical interview.

CPBrains Ultimate DSA Sheet

This sheet is designed for beginners who are starting their DSA journey and want to build a strong foundation. It covers all essential topics with a carefully curated set of problems to help you learn, practice, and master concepts effectively.

How to use: Start by solving the first 8–10 problems from each topic to understand the basics and build intuition.

Once you complete all topics, revisit them and solve the remaining problems to strengthen your understanding and gain confidence. 🚀

Problem Directory

No.Problem NameDifficultyAction
1Sqrt(x)EasySolve
2Climbing StairsEasySolve
3Add DigitsEasySolve
4Happy NumberEasySolve
5Ugly NumberEasySolve
6Perfect NumberEasySolve
7Reverse IntegerEasySolve
8Palindrome NumberEasySolve
9Power of ThreeEasySolve
10Power of FourEasySolve
11Excel Sheet Column NumberEasySolve
12Excel Sheet Column TitleEasySolve
13Valid BoomerangEasySolve
14Find the Winner of the Circular GameEasySolve
15Base 7EasySolve
16Divide Two IntegersMediumSolve
17Count PrimesMediumSolve
18Integer BreakMediumSolve
19Pow(x, n)MediumSolve
20Multiply StringsMediumSolve
21Fraction to Recurring DecimalMediumSolve
22Rotate FunctionMediumSolve
23Valid SquareMediumSolve
24Complex Number MultiplicationMediumSolve
25Random Pick with WeightMediumSolve
26Max Points on a LineHardSolve
27Basic CalculatorHardSolve
28Number of Digit OneHardSolve
29Kth Smallest Number in Multiplication TableHardSolve
30Erect the FenceHardSolve
No.Problem NameDifficultyAction
1Number of 1 BitsEasySolve
2Counting BitsEasySolve
3Reverse BitsEasySolve
4Power of TwoEasySolve
5Single NumberEasySolve
6Missing NumberEasySolve
7Hamming DistanceEasySolve
8Binary WatchEasySolve
9Set MismatchEasySolve
10Alternating BitsEasySolve
11Prime Number of Set Bits in Binary RepresentationEasySolve
12Sort Integers by The Number of 1 BitsEasySolve
13XOR Operation in an ArrayEasySolve
14Decode XORed ArrayEasySolve
15Minimum Bit Flips to Convert NumberEasySolve
16Single Number IIMediumSolve
17Single Number IIIMediumSolve
18Bitwise AND of Numbers RangeMediumSolve
19Maximum Product of Word LengthsMediumSolve
20SubsetsMediumSolve
21Gray CodeMediumSolve
22Total Hamming DistanceMediumSolve
23Minimum Flips to Make a OR b Equal to cMediumSolve
24Find the Original Array of Prefix XorMediumSolve
25Neighboring Bitwise XORMediumSolve
26Maximum XOR of Two Numbers in an ArrayHardSolve
27Maximum XOR With an Element From ArrayHardSolve
28Find Minimum Time to Finish All JobsHardSolve
29Maximum Score Words Formed by LettersHardSolve
30Minimum One Bit Operations to Make Integers ZeroHardSolve
No.Problem NameDifficultyAction
1Fibonacci NumberEasySolve
2N-th Tribonacci NumberEasySolve
3Power of TwoEasySolve
4Power of ThreeEasySolve
5Power of FourEasySolve
6Reverse StringEasySolve
7Reverse Linked ListEasySolve
8Merge Two Sorted ListsEasySolve
9Symmetric TreeEasySolve
10Maximum Depth of Binary TreeEasySolve
11Invert Binary TreeEasySolve
12Search in a Binary Search TreeEasySolve
13Path SumEasySolve
14Range Sum of BSTEasySolve
15Minimum Distance Between BST NodesEasySolve
16Pow(x, n)MediumSolve
17Swap Nodes in PairsMediumSolve
18Add Two NumbersMediumSolve
19K-th Symbol in GrammarMediumSolve
20Different Ways to Add ParenthesesMediumSolve
21Elimination GameMediumSolve
22Predict the WinnerMediumSolve
23Decode StringMediumSolve
24Find the Winner of the Circular GameMediumSolve
25Construct Quad TreeMediumSolve
26Basic CalculatorHardSolve
27Integer to English WordsHardSolve
28Parse Lisp ExpressionHardSolve
29Stamping The SequenceHardSolve
30K-th Smallest in Lexicographical OrderHardSolve
No.Problem NameDifficultyAction
1Contains DuplicateEasySolve
2Valid AnagramEasySolve
3Majority ElementEasySolve
4Missing NumberEasySolve
5Intersection of Two ArraysEasySolve
6Squares of a Sorted ArrayEasySolve
7Assign CookiesEasySolve
8Array PartitionEasySolve
9Maximum Product of Three NumbersEasySolve
10Sort Array By ParityEasySolve
11Height CheckerEasySolve
12Relative Sort ArrayEasySolve
13Make Two Arrays Equal by Reversing SubarraysEasySolve
14Minimum Absolute DifferenceEasySolve
15Sort Integers by The Number of 1 BitsEasySolve
16Sort ColorsMediumSolve
17Merge IntervalsMediumSolve
18Kth Largest Element in an ArrayMediumSolve
19Top K Frequent ElementsMediumSolve
20Sort Characters By FrequencyMediumSolve
21K Closest Points to OriginMediumSolve
22Largest NumberMediumSolve
23Wiggle Sort IIMediumSolve
24Pancake SortingMediumSolve
25Custom Sort StringMediumSolve
26Reverse PairsHardSolve
27Count of Smaller Numbers After SelfHardSolve
28Maximum GapHardSolve
29Data Stream as Disjoint IntervalsHardSolve
30Minimum Number of Operations to Sort a Binary Tree by LevelHardSolve
No.Problem NameDifficultyAction
1Two SumEasySolve
2Valid AnagramEasySolve
3Contains DuplicateEasySolve
4Replace Elements with Greatest Element on Right SideEasySolve
5Is SubsequenceEasySolve
6Length of Last WordEasySolve
7Longest Common PrefixEasySolve
8Pascal's TriangleEasySolve
9Remove ElementEasySolve
10Majority ElementEasySolve
11Find Pivot IndexEasySolve
12Find All Numbers Disappeared in an ArrayEasySolve
13Squares of a Sorted ArrayEasySolve
14Move ZeroesEasySolve
15Intersection of Two ArraysEasySolve
16Group AnagramsMediumSolve
17Top K Frequent ElementsMediumSolve
18Product of Array Except SelfMediumSolve
19Valid SudokuMediumSolve
20Longest Consecutive SequenceMediumSolve
21Sort ColorsMediumSolve
22Subarray Sum Equals KMediumSolve
23Next PermutationMediumSolve
24Rotate ImageMediumSolve
25Set Matrix ZeroesMediumSolve
26First Missing PositiveHardSolve
27Trapping Rain WaterHardSolve
28Sudoku SolverHardSolve
29N-QueensHardSolve
30Largest Rectangle in HistogramHardSolve
No.Problem NameDifficultyAction
1Valid PalindromeEasySolve
2Reverse StringEasySolve
3First Unique Character in a StringEasySolve
4Isomorphic StringsEasySolve
5Word PatternEasySolve
6Add StringsEasySolve
7Reverse Vowels of a StringEasySolve
8Valid Palindrome IIEasySolve
9Check If Two String Arrays are EquivalentEasySolve
10Goal Parser InterpretationEasySolve
11Defanging an IP AddressEasySolve
12Shuffle StringEasySolve
13Split a String in Balanced StringsEasySolve
14Longest PalindromeEasySolve
15Roman to IntegerEasySolve
16Longest Substring Without Repeating CharactersMediumSolve
17Longest Palindromic SubstringMediumSolve
18String to Integer (atoi)MediumSolve
19Zigzag ConversionMediumSolve
20Find All Anagrams in a StringMediumSolve
21Permutation in StringMediumSolve
22Minimum Number of Steps to Make Two Strings AnagramMediumSolve
23Decode StringMediumSolve
24Palindromic SubstringsMediumSolve
25Multiply StringsMediumSolve
26Minimum Window SubstringHardSolve
27Wildcard MatchingHardSolve
28Regular Expression MatchingHardSolve
29Longest Valid ParenthesesHardSolve
30Edit DistanceHardSolve
No.Problem NameDifficultyAction
1Best Time to Buy and Sell StockEasySolve
2Valid PalindromeEasySolve
3Merge Sorted ArrayEasySolve
4Reverse StringEasySolve
5Move ZeroesEasySolve
6Minimum Difference Between Highest and Lowest of K ScoresEasySolve
7Substrings of Size Three with Distinct CharactersEasySolve
8Maximum Average Subarray IEasySolve
9Find the K-Beauty of a NumberEasySolve
10Minimum Recolors to Get K Consecutive Black BlocksEasySolve
11Longest Nice SubstringEasySolve
12Two Sum II - Input Array Is SortedEasySolve
13Remove Duplicates from Sorted ArrayEasySolve
14Reverse Words in a String IIIEasySolve
15Intersection of Two Arrays IIEasySolve
16Container With Most WaterMediumSolve
173SumMediumSolve
18Longest Substring Without Repeating CharactersMediumSolve
19Longest Repeating Character ReplacementMediumSolve
20Max Consecutive Ones IIIMediumSolve
21Fruit Into BasketsMediumSolve
22Permutation in StringMediumSolve
23Find All Anagrams in a StringMediumSolve
24Subarray Product Less Than KMediumSolve
25Minimum Size Subarray SumMediumSolve
26Sliding Window MaximumHardSolve
27Minimum Window SubstringHardSolve
28Subarrays with K Different IntegersHardSolve
29Minimum Window SubsequenceHardSolve
30Substring with Concatenation of All WordsHardSolve
No.Problem NameDifficultyAction
1Binary SearchEasySolve
2First Bad VersionEasySolve
3Search Insert PositionEasySolve
4Guess Number Higher or LowerEasySolve
5Valid Perfect SquareEasySolve
6Arranging CoinsEasySolve
7Find Smallest Letter Greater Than TargetEasySolve
8Peak Index in a Mountain ArrayEasySolve
9Kth Missing Positive NumberEasySolve
10Count Negative Numbers in a Sorted MatrixEasySolve
11Special Array With X Elements Greater Than or Equal XEasySolve
12Check If N and Its Double ExistEasySolve
13The K Weakest Rows in a MatrixEasySolve
14Find Target Indices After Sorting ArrayEasySolve
15Find Distance Value Between Two ArraysEasySolve
16Search a 2D MatrixMediumSolve
17Search in Rotated Sorted ArrayMediumSolve
18Find Minimum in Rotated Sorted ArrayMediumSolve
19Find First and Last Position of Element in Sorted ArrayMediumSolve
20Koko Eating BananasMediumSolve
21Find Peak ElementMediumSolve
22Time Based Key-Value StoreMediumSolve
23Capacity To Ship Packages Within D DaysMediumSolve
24Minimum Number of Days to Make m BouquetsMediumSolve
25Single Element in a Sorted ArrayMediumSolve
26Median of Two Sorted ArraysHardSolve
27Find in Mountain ArrayHardSolve
28Split Array Largest SumHardSolve
29Find Minimum in Rotated Sorted Array IIHardSolve
30Kth Smallest Element in a Sorted MatrixHardSolve
No.Problem NameDifficultyAction
1Reverse Linked ListEasySolve
2Merge Two Sorted ListsEasySolve
3Linked List CycleEasySolve
4Middle of the Linked ListEasySolve
5Palindrome Linked ListEasySolve
6Remove Linked List ElementsEasySolve
7Intersection of Two Linked ListsEasySolve
8Delete Node in a Linked ListEasySolve
9Remove Duplicates from Sorted ListEasySolve
10Convert Binary Number in a Linked List to IntegerEasySolve
11Design HashSetEasySolve
12Design HashMapEasySolve
13Print the Elements of a Linked ListEasySolve
14Insert a Node at the Tail of a Linked ListEasySolve
15Insert a Node at the Head of a Linked ListEasySolve
16Add Two NumbersMediumSolve
17Copy List with Random PointerMediumSolve
18LRU CacheMediumSolve
19Remove Nth Node From End of ListMediumSolve
20Reorder ListMediumSolve
21Find the Duplicate NumberMediumSolve
22Swap Nodes in PairsMediumSolve
23Rotate ListMediumSolve
24Partition ListMediumSolve
25Sort ListMediumSolve
26Merge k Sorted ListsHardSolve
27Reverse Nodes in k-GroupHardSolve
28LFU CacheHardSolve
29All O`one Data StructureHardSolve
30Design SkiplistHardSolve
No.Problem NameDifficultyAction
1Valid ParenthesesEasySolve
2Implement Queue using StacksEasySolve
3Implement Stack using QueuesEasySolve
4Min StackMediumSolve
5Next Greater Element IEasySolve
6Baseball GameEasySolve
7Backspace String CompareEasySolve
8Remove All Adjacent Duplicates In StringEasySolve
9Make The String GreatEasySolve
10Crawler Log FolderEasySolve
11Number of Students Unable to Eat LunchEasySolve
12Time Needed to Buy TicketsEasySolve
13First Unique Character in a StringEasySolve
14Number of Recent CallsEasySolve
15Design Parking SystemEasySolve
16Evaluate Reverse Polish NotationMediumSolve
17Daily TemperaturesMediumSolve
18Decode StringMediumSolve
19Asteroid CollisionMediumSolve
20Design Circular QueueMediumSolve
21Design Circular DequeMediumSolve
22Minimum Remove to Make Valid ParenthesesMediumSolve
23132 PatternMediumSolve
24Online Stock SpanMediumSolve
25Simplify PathMediumSolve
26Largest Rectangle in HistogramHardSolve
27Maximal RectangleHardSolve
28Sliding Window MaximumHardSolve
29Trapping Rain WaterHardSolve
30Design a Text EditorHardSolve
No.Problem NameDifficultyAction
1Last Stone WeightEasySolve
2Kth Largest Element in a StreamEasySolve
3Relative RanksEasySolve
4The K Weakest Rows in a MatrixEasySolve
5Maximum Product of Two Elements in an ArrayEasySolve
6Make Array Zero by Subtracting Equal AmountsEasySolve
7Take Gifts From the Richest PileEasySolve
8Delete Greatest Value in Each RowEasySolve
9Minimum Amount of Time to Fill CupsEasySolve
10Minimum Operations to Halve Array SumMediumSolve
11Sorting the SentenceEasySolve
12Find Subsequence of Length K With the Largest SumEasySolve
13Maximum Units on a TruckEasySolve
14Keep Multiplying Found Values by TwoEasySolve
15Kth Distinct String in an ArrayEasySolve
16Top K Frequent ElementsMediumSolve
17Kth Largest Element in an ArrayMediumSolve
18Find K Pairs with Smallest SumsMediumSolve
19Task SchedulerMediumSolve
20Reorganize StringMediumSolve
21K Closest Points to OriginMediumSolve
22Sort Characters By FrequencyMediumSolve
23Top K Frequent WordsMediumSolve
24Ugly Number IIMediumSolve
25Find the Kth Largest Integer in the ArrayMediumSolve
26Merge k Sorted ListsHardSolve
27Find Median from Data StreamHardSolve
28Sliding Window MaximumHardSolve
29IPOHardSolve
30Trapping Rain Water IIHardSolve
No.Problem NameDifficultyAction
1Binary WatchEasySolve
2Sum of All Subset XOR TotalsEasySolve
3Pascal's TriangleEasySolve
4Pascal's Triangle IIEasySolve
5Find All PathsEasySolve
6Minimum Distance Between BST NodesEasySolve
7Increasing Order Search TreeEasySolve
8Leaf-Similar TreesEasySolve
9Univalued Binary TreeEasySolve
10Cousins in Binary TreeEasySolve
11Find Mode in Binary Search TreeEasySolve
12Construct String from Binary TreeEasySolve
13Average of Levels in Binary TreeEasySolve
14Binary Tree TiltEasySolve
15Diameter of Binary TreeEasySolve
16SubsetsMediumSolve
17PermutationsMediumSolve
18Combination SumMediumSolve
19Word SearchMediumSolve
20CombinationsMediumSolve
21Subsets IIMediumSolve
22Permutations IIMediumSolve
23Combination Sum IIMediumSolve
24Combination Sum IIIMediumSolve
25Letter Combinations of a Phone NumberMediumSolve
26N-QueensHardSolve
27Sudoku SolverHardSolve
28Word Search IIHardSolve
29N-Queens IIHardSolve
30Remove Invalid ParenthesesHardSolve
No.Problem NameDifficultyAction
1Assign CookiesEasySolve
2Lemonade ChangeEasySolve
3Array PartitionEasySolve
4Maximum 69 NumberEasySolve
5Minimum Cost to Move Chips to The Same PositionEasySolve
6Split a String in Balanced StringsEasySolve
7Minimum Time to Type Word Using Special TypewriterEasySolve
8Minimum Moves to Convert StringEasySolve
9Maximum Number of Words You Can TypeEasySolve
10Minimum Operations to Make the Array IncreasingEasySolve
11Calculate Money in Leetcode BankEasySolve
12Maximum Units on a TruckEasySolve
13Water BottlesEasySolve
14Apple Redistribution into BoxesEasySolve
15Largest Odd Number in StringEasySolve
16Jump GameMediumSolve
17Gas StationMediumSolve
18Task SchedulerMediumSolve
19Partition LabelsMediumSolve
20Jump Game IIMediumSolve
21Non-overlapping IntervalsMediumSolve
22Minimum Number of Arrows to Burst BalloonsMediumSolve
23Reorganize StringMediumSolve
24Advantage ShuffleMediumSolve
25Maximum Length of Pair ChainMediumSolve
26CandyHardSolve
27IPOHardSolve
28Course Schedule IIIHardSolve
29Minimum Number of Refueling StopsHardSolve
30Maximum Profit in Job SchedulingHardSolve
No.Problem NameDifficultyAction
1Maximum Depth of Binary TreeEasySolve
2Invert Binary TreeEasySolve
3Diameter of Binary TreeEasySolve
4Balanced Binary TreeEasySolve
5Same TreeEasySolve
6Subtree of Another TreeEasySolve
7Lowest Common Ancestor of a Binary Search TreeEasySolve
8Path SumEasySolve
9Minimum Depth of Binary TreeEasySolve
10Symmetric TreeEasySolve
11Binary Tree PathsEasySolve
12Search in a Binary Search TreeEasySolve
13Merge Two Binary TreesEasySolve
14Two Sum IV - Input is a BSTEasySolve
15Convert Sorted Array to Binary Search TreeEasySolve
16Lowest Common Ancestor of a Binary TreeMediumSolve
17Binary Tree Level Order TraversalMediumSolve
18Binary Tree Right Side ViewMediumSolve
19Count Good Nodes in Binary TreeMediumSolve
20Validate Binary Search TreeMediumSolve
21Kth Smallest Element in a BSTMediumSolve
22Construct Binary Tree from Preorder and Inorder TraversalMediumSolve
23Binary Tree Zigzag Level Order TraversalMediumSolve
24Flatten Binary Tree to Linked ListMediumSolve
25Populating Next Right Pointers in Each NodeMediumSolve
26Binary Tree Maximum Path SumHardSolve
27Serialize and Deserialize Binary TreeHardSolve
28Word LadderHardSolve
29Recover Binary Search TreeHardSolve
30Vertical Order Traversal of a Binary TreeHardSolve
No.Problem NameDifficultyAction
1Island PerimeterEasySolve
2Find the Town JudgeEasySolve
3Flood FillEasySolve
4Find if Path Exists in GraphEasySolve
5Maximum Depth of N-ary TreeEasySolve
6Employee ImportanceEasySolve
7Cousins in Binary TreeEasySolve
8Minimum Number of Vertices to Reach All NodesEasySolve
9Water BottlesEasySolve
10Number of ProvincesEasySolve
11Graph Valid Tree (Premium)EasySolve
12Number of Connected Components in an Undirected GraphEasySolve
13Path With Minimum EffortEasySolve
14Matrix Diagonal SumEasySolve
15Find Center of Star GraphEasySolve
16Number of IslandsMediumSolve
17Max Area of IslandMediumSolve
18Clone GraphMediumSolve
19Walls and GatesMediumSolve
20Rotting OrangesMediumSolve
21Pacific Atlantic Water FlowMediumSolve
22Surrounded RegionsMediumSolve
23Course ScheduleMediumSolve
24Course Schedule IIMediumSolve
25Network Delay TimeMediumSolve
26Word LadderHardSolve
27Minimum Degree of a Connected Trio in a GraphHardSolve
28Alien DictionaryHardSolve
29Cheapest Flights Within K StopsHardSolve
30Longest Increasing Path in a MatrixHardSolve
No.Problem NameDifficultyAction
1Climbing StairsEasySolve
2Min Cost Climbing StairsEasySolve
3Fibonacci NumberEasySolve
4N-th Tribonacci NumberEasySolve
5Maximum SubarrayEasySolve
6Best Time to Buy and Sell StockEasySolve
7Is SubsequenceEasySolve
8Counting BitsEasySolve
9Pascal's TriangleEasySolve
10Pascal's Triangle IIEasySolve
11Divisor GameEasySolve
12Get Maximum in Generated ArrayEasySolve
13Maximum Score After Splitting a StringEasySolve
14Decode WaysEasySolve
15Coin ChangeEasySolve
16Coin Change IIMediumSolve
17Longest Increasing SubsequenceMediumSolve
18Longest Common SubsequenceMediumSolve
19Word BreakMediumSolve
20Combination Sum IVMediumSolve
21House RobberMediumSolve
22House Robber IIMediumSolve
23Palindromic SubstringsMediumSolve
24Unique PathsMediumSolve
25Maximum Product SubarrayMediumSolve
26Burst BalloonsHardSolve
27Regular Expression MatchingHardSolve
28Longest Valid ParenthesesHardSolve
29Edit DistanceHardSolve
30Maximum Profit in Job SchedulingHardSolve
No.Problem NameDifficultyAction
1Longest Common PrefixEasySolve
2Count Prefixes of a Given StringEasySolve
3Check If a Word Occurs As a Prefix of Any Word in a SentenceEasySolve
4Find Resultant Array After Removing AnagramsEasySolve
5Maximum Number of Words Found in SentencesEasySolve
6Sorting the SentenceEasySolve
7Truncate SentenceEasySolve
8Check if All Characters Have Equal Number of OccurrencesEasySolve
9Destination CityEasySolve
10Jewels and StonesEasySolve
11Unique Morse Code WordsEasySolve
12Uncommon Words from Two SentencesEasySolve
13Find Words That Can Be Formed by CharactersEasySolve
14Path CrossingEasySolve
15Check If Two String Arrays are EquivalentEasySolve
16Implement Trie (Prefix Tree)MediumSolve
17Design Add and Search Words Data StructureMediumSolve
18Replace WordsMediumSolve
19Maximum XOR of Two Numbers in an ArrayMediumSolve
20Search Suggestions SystemMediumSolve
21Map Sum PairsMediumSolve
22Camelcase MatchingMediumSolve
23Remove Sub-Folders from the FilesystemMediumSolve
24Implement Magic DictionaryMediumSolve
25Longest Word in DictionaryMediumSolve
26Word Search IIHardSolve
27Palindrome PairsHardSolve
28Stream of CharactersHardSolve
29Design Search Autocomplete SystemHardSolve
30Prefix and Suffix SearchHardSolve
No.Problem NameDifficultyAction
1Design Parking SystemEasySolve
2Design HashSetEasySolve
3Design HashMapEasySolve
4Range Sum Query - ImmutableEasySolve
5Kth Largest Element in a StreamEasySolve
6Moving Average from Data StreamEasySolve
7Guess Number Higher or LowerEasySolve
8First Bad VersionEasySolve
9Is Bad VersionEasySolve
10Logger Rate LimiterEasySolve
11Roman to IntegerEasySolve
12Implement Queue using StacksEasySolve
13Implement Stack using QueuesEasySolve
14Min StackMediumSolve
15Valid SudokuMediumSolve
16LRU CacheMediumSolve
17Insert Delete GetRandom O(1)MediumSolve
18Design Tic-Tac-ToeMediumSolve
19Design Underground SystemMediumSolve
20Design Browser HistoryMediumSolve
21Design a Number Container SystemMediumSolve
22Encode and Decode StringsMediumSolve
23Flatten Nested List IteratorMediumSolve
24Time Based Key-Value StoreMediumSolve
25Snapshot ArrayMediumSolve
26LFU CacheHardSolve
27All O`one Data StructureHardSolve
28Design In-Memory File SystemHardSolve
29Design Search Autocomplete SystemHardSolve
30Find Median from Data StreamHardSolve