The Most Popular Backtracking, Binary Search, Trees Questions
Just for reference…
Welcome back peeps. This post is for the students who are preparing for their tech interviews. While I’m sitting on the other side of the table as an interviewer now; I know how daunting the prep journey can be. Use it just as a reference/practice resource.
All the Complete System Design Series Parts —
6. Networking, How Browsers work, Content Network Delivery ( CDN)
Github —
Backtracking
- Distribute Repeating Integers
- Maximum Compatibility Score Sum
- Find Unique Binary String
- Minimum Number of Work Sessions to Finish the Tasks
- Maximum Product of the Length of Two Palindromic Subsequences
- Longest Subsequence Repeated k Times
- Count Number of Maximum Bitwise-OR Subsets
- Next Greater Numerically Balanced Number
- Number of Valid Move Combinations On Chessboard
- Maximum Path Quality of a Graph
- Construct the Lexicographically Largest Valid Sequence
Curated List — The Top & Most Frequently Asked Coding Questions You Should Practice
- Find Minimum Time to Finish All Jobs
- Closest Dessert Cost
- Maximize Score After N Operations
- Maximum Number of Accepted Invitations
- Splitting a String Into Descending Consecutive Values
- Sum of All Subset XOR Totals
- Letter Combinations of a Phone Number
- Generate Parentheses
- Sudoku Solver
- Combination Sum
- Number of Steps to Reduce a Number to Zero
- Letter Combinations of a Phone Number
- Generate Parentheses
- Sudoku Solver
- Combination Sum
- Combination Sum II
Most Popular Coding Questions — Company Wise List : Part 1
- Permutations
- Permutations II
- N-Queens
- N-Queens II
- Combinations
- Subsets
- Word Search
- Gray Code
- Subsets II
- Combination Sum II
- Permutations
- Permutations II
- N-Queens
- Combinations
- Subsets
- Word Search
- Subsets II
- Palindrome Partitioning
- Combination Sum III
- Word Squares
- Restore IP Addresses
- Unique Binary Search Trees II
System Design
- Path Sum II
- Word Ladder II
- Palindrome Partitioning
- Word Break II
- Word Search II
- Combination Sum III
- Factor Combinations
- Binary Tree Paths
- Palindrome Permutation II
- Expression Add Operators
- Word Pattern II
- Flip Game II
- Remove Invalid Parentheses
- Letter Tile Possibilities
- Partition to K Equal Sum Subsets
- Letter Case Permutation
- All Paths From Source to Target
- Ambiguous Coordinates
- Split Array into Fibonacci Sequence
- Numbers With Same Consecutive Differences
- Unique Paths III
- Number of Squareful Arrays
- Campus Bikes II
- Brace Expansion
- Confusing Number II
- Brace Expansion II
- Stepping Numbers
- Path with Maximum Gold
- Circular Permutation in Binary Representation
- Maximum Length of a Concatenated String with Unique Characters
- Tiling a Rectangle with the Fewest Squares
- Maximum Score Words Formed by Letters
- Synonymous Sentences
- Iterator for Combination
- Verbal Arithmetic Puzzle
- The k-th Lexicographical String of All Happy Strings of Length n
- Probability of a Two Boxes Having The Same Number of Distinct Balls
- Split a String Into the Max Number of Unique Substrings
- Maximum Number of Achievable Transfer Requests
- Additive Number
- Generalized Abbreviation
- Android Unlock Patterns
- Count Numbers with Unique Digits
- Binary Watch
- Minimum Unique Word Abbreviation
Most Popular Coding Questions — Company Wise List : Part 2
- Word Squares
- Optimal Account Balancing
- Matchsticks to Square
- Robot Room Cleaner
- Increasing Subsequences
- Target Sum
- Beautiful Arrangement
- Shopping Offers
- 24 Game
- Stickers to Spell Word
Binary Search
- Pow(x, n)
- Sqrt(x)
- Search a 2D Matrix
- Find Peak Element
- Count of Smaller Numbers After Self
- Max Sum of Rectangle No Larger Than K
- Split Array Largest Sum
- Median of Two Sorted Arrays
- Divide Two Integers
- Search in Rotated Sorted Array
- Find First and Last Position of Element in Sorted Array
- Count of Range Sum
- Intersection of Two Arrays
- Intersection of Two Arrays II
- Data Stream as Disjoint Intervals
- Russian Doll Envelopes
- Design Hit Counter
- Max Sum of Rectangle No Larger Than K
- Valid Perfect Square
- Guess Number Higher or Lower
- Kth Smallest Element in a Sorted Matrix
- Nth Digit
- Split Array Largest Sum
- Find Right Interval
- Arranging Coins
- 132 Pattern
- Heaters
- Smallest Good Base
- Reverse Pairs
- Random Point in Non-overlapping Rectangles
- Random Pick with Weight
- K-diff Pairs in an Array
- Single Element in a Sorted Array
- Valid Triangle Number
- Sum of Square Numbers
Interval
- Non-overlapping Intervals
- Meeting Rooms
- Meeting Rooms II
- Insert Interval
- Merge Intervals
- Burst Balloons
- Guess Number Higher or Lower II
- Arithmetic Slices
- Predict the Winner
- Remove Boxes
- Palindromic Substrings
- Strange Printer
- Stone Game
- Valid Permutations for DI Sequence
- Minimum Cost to Merge Stones
Python Iterators, Generators And Decorators Made Easy
- Minimum Score Triangulation of Polygon
- Last Stone Weight II
- Minimum Cost Tree From Leaf Values
- Allocate Mailboxes
- Minimum Cost to Cut a Stick
- Stone Game V
- Stone Game VII
Tree
- Lowest Common Ancestor of BST — https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
- Implement Trie (Prefix Tree) — https://leetcode.com/problems/implement-trie-prefix-tree/
- Add and Search Word — https://leetcode.com/problems/add-and-search-word-data-structure-design/
Complete Data Preprocessing and Data Visualization with Projects — Mega Compilation Part 2
- Word Search II — https://leetcode.com/problems/word-search-ii/
- Maximum Depth of Binary Tree — https://leetcode.com/problems/maximum-depth-of-binary-tree/
- Same Tree — https://leetcode.com/problems/same-tree/
- Invert/Flip Binary Tree — https://leetcode.com/problems/invert-binary-tree/
Python projects —
- Binary Tree Maximum Path Sum — https://leetcode.com/problems/binary-tree-maximum-path-sum/
- Binary Tree Level Order Traversal — https://leetcode.com/problems/binary-tree-level-order-traversal/
- Serialize and Deserialize Binary Tree — https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
- Subtree of Another Tree — https://leetcode.com/problems/subtree-of-another-tree/
- Construct Binary Tree from Preorder and Inorder Traversal — https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
- Validate Binary Search Tree — https://leetcode.com/problems/validate-binary-search-tree/
- Kth Smallest Element in a BST — https://leetcode.com/problems/kth-smallest-element-in-a-bst/
Two pointers
- Pair with target sum : https://leetcode.com/problems/two-sum/
- Remove duplicates : https://leetcode.com/problems/remove-duplicates-from-sorted-array/
- Squaring a sorted array : https://leetcode.com/problems/squares-of-a-sorted-array/
Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML
Fast & Slow pointers
- Linked list cycle : https://leetcode.com/problems/linked-list-cycle/
- Happy number : https://leetcode.com/problems/happy-number/
- Middle of a linked list : https://leetcode.com/problems/middle-of-the-linked-list/
- Palindrome linked list : https://leetcode.com/problems/palindrome-linked-list/
- Reorder a linked list : https://leetcode.com/problems/reorder-list/
Part 2 of Data Science and ML mega series ( Day 21 — Day 35) can be found here —
More Coming Soon!
Some of the other best Series —
100 days : Your Data Science and Machine Learning Degree Series with projects
Complete Data Visualization and Pre-processing Series with projects
Tech Newsletter —
If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to Tech Brew :
More Projects —
Complete Python And Projects — Mega Compilation
Complete Data Preprocessing and Data Visualization with Projects — Mega Compilation Part 2
Maths —
Statistics for Data Science and Machine Learning with Code Implementation
Maths for Data Science and Machine learning
In this post we covered Maths for ML . Topics like Linear Algebra, Calculus, Matrix and Vectors, Bayes Theorem and Cheatsheets etc are covered in detail.
For other projects, tune to —
Build Machine Learning Pipelines( With Code)
Recurrent Neural Network with Keras
Custom Layers in Keras
Follow for more updates, stay tuned and of-course let me end this post with a quote by Steve Jobs ;)
“Your time is limited, so don’t waste it living someone else’s life.”




