Important Tricks and Pattern Recognition Techniques in DSA
Step 1 – Start with Constraints
🔹 Small Input Size (n ≤ 20)
PROBLEM EXAMPLES :
Subsets (78) → Use recursion (take/not-take).
Trick: Think in terms of decision tree.
Permutations (46) → Swap elements during recursion.
Trick: Fix one element at a time, recurse on the rest.
Combination Sum (39) → DFS/backtracking.
Trick: Use “start index” to avoid duplicates.
Keep reading with a 7-day free trial
Subscribe to Veeraj’s Substack to keep reading this post and get 7 days of free access to the full post archives.