The short version
The list
- 1
Two Pointers
Iterate two indices through an array — opposite-end (Two Sum II) or same-end (remove duplicates).
Why it matters: The most-asked easy pattern across Pune services + product fresher screens.
Best for: Start here. Lowest-friction pattern to master.
- 2
Sliding Window
Maintain a moving window of valid elements; expand and contract by index.
Why it matters: Underlies most substring / subarray problems — Longest Substring Without Repeating Characters being canonical.
Best for: Strings + array subrange interview questions.
- 3
Fast & Slow Pointers (Floyd's cycle)
Two pointers moving at different speeds — detect cycles + find middle nodes.
Why it matters: Linked-list and cycle-detection rounds rely on this pattern almost exclusively.
Best for: Linked lists + linked-list-on-array problems.
- 4
Binary Search (and its variants)
Logarithmic search — classic + modified (find boundary, search rotated array).
Why it matters: Appears in 25–30% of Pune product company DSA rounds, often disguised.
Best for: Anyone targeting product companies. Practice variants until they're automatic.
- 5
Hash Map / Hash Set
Trade memory for O(1) lookup — Two Sum and 80% of frequency-counting problems.
Why it matters: The single most-used data structure in interview solutions, period.
Best for: Universal — learn first if not already comfortable.
- 6
BFS / DFS on Trees
Traverse binary trees — level order, in-order, post-order, recursive + iterative.
Why it matters: Trees are screened in every Pune product company fresher round and many services-major rounds too.
Best for: Product-company-targeted prep. Memorise iterative versions.
- 7
Recursion + Backtracking
Generate combinations + permutations + subsets; solve constraint problems (N-Queens).
Why it matters: The pattern interviewers use to test problem-decomposition thinking.
Best for: Anyone targeting beyond services-major tier.
- 8
Dynamic Programming (basic)
1D and 2D DP — Climbing Stairs, House Robber, Longest Common Subsequence.
Why it matters: Differentiator between medium-only and hard-capable candidates.
Best for: Product-company DSA prep. 30+ DP problems before strong-company interviews.
- 9
Greedy
Make locally-optimal choices — Jump Game, Best Time to Buy and Sell Stock.
Why it matters: Often disguised as 'array maximum' problems — pattern recognition is the test.
Best for: Standalone pattern; ~10 problems builds intuition.
- 10
Heap / Priority Queue →
Top-K / Kth-largest patterns — using a heap to avoid full sorting.
Why it matters: Common at product companies; rarer at services majors.
Best for: Product-company-targeted prep. Bonus pattern after the first 9.
How we built this list
Patterns were ranked by Pune fresher interview frequency across services majors (Persistent, Capgemini, Mindtree, Tech Mahindra, Cognizant), product companies (BrowserStack, Druva, Helpshift, GUVI, ZS), and growing AI startups, weighted by the volume of fresher hiring at each tier. Practice volume targets: 50+ easy + 20 medium for services tier, 100+ medium + 20 hard for product tier, focused on these 10 patterns.
FAQs
Common questions about leetcode patterns for pune freshers.
How many LeetCode problems do I need to solve for a Pune fresher IT job?
Services-major tier: 50+ easy + 20 medium across these 10 patterns is the working baseline. Product-company tier: 100+ medium + 20 hard. Top-tier product companies (BrowserStack, Persistent product, AI startups): 250+ medium/hard with competitive-programming exposure. The patterns matter more than the count — 200 problems across all 10 patterns beats 500 random problems.
Should I solve problems in Java or Python for Pune interviews?
Use the language you'll actually interview in. Most candidates pick Python for LeetCode practice (faster to write) regardless of their interview language — that's fine for pattern learning, but spend the last 2 weeks before interviews practising in your interview language so you don't fumble syntax under pressure.
Which pattern should I learn first if I'm starting from zero?
Hash Map / Hash Set first — it underlies more solutions than any other single tool and is the easiest to develop intuition for. Two Pointers second. Then Sliding Window. After those three, you can solve a large share of easy-tier problems, which builds confidence before tackling Binary Search + tree patterns. Trying to start with DP or backtracking before this foundation usually ends in tutorial fatigue without retention.