Crack Your First Coding Interview in India: DSA Patterns + Company Questions
A fresher map for coding interview preparation in India: the rounds at TCS, Infosys, and product companies, the ~10 DSA patterns that matter, and a realistic weeks-not-months prep plan.

Six hundred problems solved on a coding site, and still a complete freeze in the first TCS interview — unable to even start the easy one. The count was never the problem. There was no plan, and not one solution had ever been said out loud before that morning.
I am Arnab, a full-stack instructor at DevHives in Kolkata. I have watched a lot of freshers walk into their first interview the wrong way. So let me give you the whole map in one place.
The short answer
To crack your first coding interview in India as a fresher, pick your track first (service or product company), learn about 10 DSA patterns instead of grinding 3000 problems, and practise saying your approach out loud in English. Most freshers fail not on the code, but on the talk-through and the plan. You can get interview-ready in 6 to 10 focused weeks, not months.
What rounds should you expect in a coding interview in India?
Most Indian fresher interviews follow a fixed shape: an online test, one or two coding or technical rounds, and an HR round. Knowing the shape lowers your fear. You stop guessing and start preparing the right thing.
Here is the path most freshers walk through, start to finish:
- Online assessment. Aptitude, basic coding, and sometimes a typing or English test. This is the first filter.
- Technical round 1. Coding problems, your projects, and core subjects like DBMS, OOP, and operating systems.
- Technical round 2. Deeper questions, harder problems, or system design for product companies.
- HR round. Behavioural questions, your story, salary, and relocation. This is where the STAR method helps.
Service companies often merge rounds 2 and 3. Product companies add more coding rounds. The GeeksforGeeks interview experiences archive is a goldmine here. Search your target company and read 10 recent posts before you sit.
Which DSA patterns actually show up?
About 10 DSA patterns cover most of the questions freshers are asked. You do not need 3000 problems. You need to recognise the pattern fast and code it cleanly.
This is where most freshers waste months. They solve random problems with no theme. Then a new problem appears and nothing transfers. Patterns fix that. Learn the shape once, and 50 problems start to look like 5.
Here are the DSA patterns for coding interviews that matter most for freshers:
- Arrays and Hashing — counting, lookups, and duplicates with a hash map.
- Two Pointers — pairs in a sorted array, reversing, and palindrome checks.
- Sliding Window — longest or smallest subarray that meets a rule.
- Binary Search — search in sorted data, and search on the answer.
- Stack — valid brackets, next greater element, and history.
- Linked List — reverse, find the middle, and detect a cycle.
- Trees (BFS and DFS) — height, traversal, and path sums.
- Graphs (BFS and DFS) — connected parts, shortest path on a grid.
- Heaps — top K elements and merging sorted lists.
- Dynamic Programming — the basics: climbing stairs, coin change, and subsequences.
Start with the first four. They appear in almost every interview. Here is a tiny Two Pointers example in Python, so you can see how small the core idea is:
# Check if a sorted array has two numbers that sum to target
def has_pair(nums, target):
left, right = 0, len(nums) - 1
while left < right:
total = nums[left] + nums[right]
if total == target:
return True
if total < target:
left += 1 # need a bigger sum
else:
right -= 1 # need a smaller sum
return False
For a curated problem set, I send students to Grind 75 and NeetCode Practice. Both group problems by pattern, which is exactly what you want.
Service or product company — why pick your track first?
Pick your track first because service and product companies test very different things. If you prepare for both at once, you do neither one well. Choose based on where you can realistically get interviews this season.
Service companies like TCS, Infosys, Wipro, and Cognizant hire in large numbers. They value clear basics, communication, and reliability. Product companies and FAANG-India teams like Flipkart, Swiggy, and Razorpay hire fewer people. They push harder on DSA depth and problem-solving.
This table shows the real difference, so you can choose with open eyes:
| What to compare | Service (TCS, Infosys, Wipro, Cognizant) | Product / FAANG-India (Flipkart, Swiggy, Razorpay) |
|---|---|---|
| Rounds | Online test, 1-2 technical, HR | Online test, 2-4 coding, system design, HR |
| DSA depth | Easy to medium; basics matter most | Medium to hard; speed and edge cases matter |
| Core subjects | Heavy: DBMS, OOP, OS, networks | Lighter, but still asked |
| What they want | Clear basics, communication, stability | Strong problem-solving, clean code, depth |
| Hiring volume | Very high (thousands) | Low (selective) |
| Best for | A steady first job and a safe start | Higher pay, if your DSA is strong |
My honest advice: most freshers should target service companies first. Get the job, build real experience, then switch to a product company in 1 to 2 years. There is no shame in a service start. I have seen students grow into great engineers from exactly that path. For more on the wider market, read my piece on the junior developer job market in 2026.
How do you prepare when you only have a few weeks?
You prepare in weeks, not months, by limiting scope and practising out loud daily. A focused 8-week plan beats six months of random solving. Here is the plan I give freshers who have a placement season coming.
- Weeks 1-2: Core four patterns. Arrays and Hashing, Two Pointers, Sliding Window, Binary Search. Solve 4 to 5 problems per pattern.
- Weeks 3-4: Linear structures. Stack, Linked List, and Heaps. Keep solving, and start a small mistake log.
- Weeks 5-6: Trees and Graphs. Learn BFS and DFS well. These scare freshers, but the pattern is short once it clicks.
- Week 7: Basic DP and revision. Climbing stairs, coin change, longest subsequence. Revisit your weak patterns.
- Week 8: Mock interviews. Solve with a timer and speak every step out loud. Record yourself once. It feels awkward, and it works.
Mix in your core subjects and projects across all 8 weeks. Spend 30 minutes a day on DBMS, OOP, and OS for service company rounds. If you want a fuller learning base before this sprint, see how to learn to code in 2026.
The Tech Interview Handbook prep guide has a longer schedule too, if you have three months instead of two.
How do you talk through a problem out loud in English?
You talk through a problem by narrating your thinking in simple steps, before and while you write code. The interviewer hires your thinking, not just your final answer. Silence is the thing that hurts freshers most.
I will be honest about my own start. In my first interviews, my English froze under pressure. I knew the answer and could not say it. What fixed it was practice, not talent. I spoke my solutions out loud at home, alone, until the words came easily.
Use this simple talk-through frame in every coding round:
- Repeat the problem in your own words. “So I need to find the longest part with no repeated letters.”
- State your plan before coding. “I will use a sliding window and a set.”
- Name the trade-off. “This is O(n) time and O(n) space.”
- Speak as you code. “Now I move the right pointer and add this letter.”
- Check with an example. “Let me run it on ‘abcabc’ to be sure.”
Short, simple sentences are fine. You do not need fancy English. You need clear English. Ask for a minute to think if you need it. That is a sign of calm, not weakness.
Save this and try it today: pick one easy problem and solve it out loud, on a video call with a friend or alone with your phone recording. Do this once a day for a week.
What does the HR and behavioural round ask?
The HR round asks about your story, your strengths, your failures, and your fit. Use the STAR method to answer: Situation, Task, Action, Result. It turns a vague answer into a clear, short story.
Common questions freshers should prepare:
- Tell me about yourself. (Keep it to 60 seconds, focused on tech and projects.)
- Tell me about a project you are proud of, and your exact role in it.
- Tell me about a time you faced a hard bug or a conflict in a team.
- Why this company, and why this role?
- Are you open to relocation, shifts, or a service agreement?
For the project question, know your own code deeply. If you used a database, be ready to explain why you chose it. Prepare two real stories using STAR, and you can adapt them to most behavioural questions.
What mistakes quietly cost freshers the offer?
The quiet mistakes are silence, no plan, no track, and giving up after one hard problem. None of these show up as a wrong answer. They show up as a “no” you never understand.
I want to speak directly to a fear I hear a lot. If you are from a tier-3 college or have a low CGPA, you may feel the odds are against you. That fear is real, and it is not the full story. Service companies hire from every tier of college. Your skill and your talk-through matter more than your college name once you are in the room.
Here are the mistakes to avoid:
- Coding in silence. The interviewer cannot read your mind. Talk.
- Grinding without a track. Pick service or product, then prepare for that.
- Solving without patterns. Counting problems is not the same as learning.
- Skipping core subjects. Service rounds lean hard on DBMS and OOP.
- Quitting on the first hard problem. Ask for a hint and keep going.
- Not reading interview experiences. Real questions are public. Use them.
Whether AI will change all of this is a fair worry too. I wrote about that in is it worth learning to code now that AI exists. The short version: the basics in this post still matter.
Your next step
Do one thing today: pick your track, write down the four core patterns, and solve one problem out loud. That single hour puts you ahead of the student who has solved 600 in silence.
Pick the round that scares you most and rehearse only that one this week — out loud, to a whiteboard or an empty chair. The talking is what fails freshers far more often than the code does.


