TCS Interview Prep (Ninja / Digital / Prime)

TCS hires at a volume no product company comes close to, and the loop is built for that volume. One standardised test — the National Qualifier Test, run by TCS iON — does nearly all the filtering, and the interviews that follow are shorter and broader than a product-company loop. The part candidates get wrong is where the test actually rejects them: the numerical, verbal and reasoning sections eliminate more people than the coding section does. Someone who codes well but has never sat a timed aptitude paper gets cut before anyone reads a line of their code.

The second thing to get right is track. Everyone sits the same NQT and your score decides which pool you are interviewed for. Clearing the Foundation section puts you in the Ninja pool; clearing the Advanced section as well is what opens the higher-package Digital and Prime tracks. The interviews diverge just as much as the packages do — a Ninja technical round stays close to your project and basic fundamentals, while Digital and Prime push into DBMS, operating systems, networks and real coding, with Prime reports increasingly expecting a data or AI project you can defend. Preparing for Ninja and hoping to be bumped up is the most common mistake on this loop.


Interview Process

Stage Duration Focus
NQT Foundation Section ~75 min Numerical, verbal and reasoning ability
NQT Advanced Section ~115 min Advanced quantitative and reasoning plus hands-on coding
Technical Interview 20-45 min Project, DBMS, OS, networks, one or two coding questions
Managerial Interview 15-30 min Scenario questions, teamwork, handling pressure
HR Interview 10-20 min Relocation, shifts, service agreement, communication

The Advanced section is the track gate, not a bonus round. Attempting it half-heartedly is what puts strong candidates in the Ninja pool. Reports consistently describe all three interviews happening on the same day, often with a single panel moving between technical, managerial and HR questions, so the whole thing can be over in under an hour. Note also that the NQT is a shared test: your score is visible to other employers who recruit through TCS iON, which makes it worth sitting properly even if TCS is not your first choice. Candidates from three-year degrees usually come through a separate Smart Hiring drive with a similar shape.


What TCS Actually Tests

Derived from 253 reported TCS-tagged problems. Difficulty mix:

Difficulty Count Share
Easy 113 45%
Medium 116 46%
Hard 24 9%

The list skews Easy and Medium. Speed and clean code matter more here than exotic algorithms.

Where those problems fall by pattern:

Rank Pattern Problems Share of list
1 Arrays & Hashing 64 25%
2 Sliding Window & Two Pointers 36 14%
3 Dynamic Programming 31 12%
4 Binary Search 24 9%
5 Strings 16 6%
6 Trees 14 6%
7 Math & Bit Manipulation 12 5%
8 Stack & Monotonic Stack 11 4%
9 Intervals, Greedy & Sorting 10 4%
10 Heap / Priority Queue 9 4%

TCS Signature Problems

These rank high on TCS’s list but are reported by few other companies — the questions that are distinctively theirs rather than generic interview classics. The last column is how many of the 142 companies on this site report each one.

# Problem Pattern Difficulty Also asked at Link
1 Longest Palindromic Substring Manacher + Two Pointers Medium 56 of 142 Solve →
2 Maximum Subarray Divide and Conquer + DP Medium 51 of 142 Solve →
3 Container With Most Water Greedy + Two Pointers Medium 43 of 142 Solve →
4 First Missing Positive Hash Table + Array Hard 29 of 142 Solve →
5 Sort Colors Bubble Sort + Quicksort Medium 31 of 142 Solve →
6 Integer to Roman Math + Hash Table Medium 28 of 142 Solve →
7 Reverse Integer Math Medium 19 of 142 Solve →
8 Jump Game Greedy + DP Medium 27 of 142 Solve →
9 Minimum Operations to Exceed Threshold Value II Heap Medium 4 of 142 LeetCode →
10 Bitwise ORs of Subarrays Bit Manipulation + DP Medium 7 of 142 LeetCode →
11 Split Array With Same Average Meet in the Middle + Bitmask Hard 6 of 142 LeetCode →
12 Sort an Array Radix Sort + Counting Sort Medium 10 of 142 LeetCode →
13 Tallest Billboard Meet in the Middle + 0-1 Knapsack Hard 5 of 142 LeetCode →
14 Delete the Middle Node of a Linked List Linked List + Two Pointers Medium 7 of 142 Solve →

If you are short on time, these carry more TCS-specific signal per hour than the universal top-100 lists.


Reported in the Last Six Months

The recency-filtered slice of TCS’s list, ranked by how often each was reported. Expect heavy overlap with the all-time classics — that overlap is the point, it means these stay in rotation.

# Problem Pattern Difficulty Link
1 Two Sum Hash Table + Array Easy Solve →
2 Rank Transform of an Array Sorting + Hash Table Easy LeetCode →
3 Container With Most Water Greedy + Two Pointers Medium Solve →
4 First Missing Positive Hash Table + Array Hard Solve →
5 Integer to Roman Math + Hash Table Medium Solve →
6 Longest Palindromic Substring Manacher + Two Pointers Medium Solve →
7 Fibonacci Number Memoization + DP Easy Solve →
8 Roman to Integer Math + Hash Table Easy Solve →
9 Maximum Subarray Divide and Conquer + DP Medium Solve →
10 Palindrome Number Math Easy Solve →
11 Valid Anagram Sorting + Hash Table Easy Solve →
12 Largest Rectangle in Histogram Range Query + Monotonic Stack Hard Solve →
13 Longest Common Prefix Trie Easy Solve →
14 Maximum Product Subarray DP Medium Solve →
15 Move Zeroes Two Pointers Easy Solve →

System Design (HLD) Problems Asked at TCS

# Problem Difficulty Link
1 Payment System (Banking Integrations) Advanced Read →
2 Rules Engine (Policy and Claims Rules) Intermediate Read →
3 Distributed Job Scheduler (Overnight Batch Runs) Advanced Read →
4 Message Queue Advanced Read →
5 Notification System Intermediate Read →
6 Metrics and Monitoring System Intermediate Read →
7 URL Shortener Beginner Read →

LLD / Machine Coding Problems Asked at TCS

Neither this list nor the system design list above belongs in a fresher loop. Entry-level TCS interviews do not run a design round, and padding your preparation with architecture diagrams instead of aptitude practice is a straight loss. Both lists are here for lateral and experienced hiring, where TCS does interview for design, and for the occasional “model the classes for this” question in a Digital or Prime technical round.

# Problem Difficulty Link
1 Library Management Beginner Read →
2 Parking Lot Beginner Read →
3 Vending Machine Beginner Read →
4 Order Management System Intermediate Read →
5 Inventory Management Intermediate Read →

DSA Problems Asked at TCS

73 problems across 11 pattern groups. Each group is allocated in proportion to its real share of TCS’s tagged list, then filled with the highest-frequency problems in that group — so the weight here matches the distribution above rather than burying graph and tree work under the usual array classics.

Arrays & Hashing

Prefix sums, counting, and grid walks. The warm-up round, and the one people get careless on. Showing the top 14 of 23 on the list.

# Problem Pattern Difficulty Link
1 Friday Purchases I Database Medium LeetCode →
2 Two Sum Hash Table + Array Easy Solve →
3 Palindrome Number Math Easy Solve →
4 Rank Transform of an Array Sorting + Hash Table Easy LeetCode →
5 Second Highest Salary Database Medium Solve →
6 First Missing Positive Hash Table + Array Hard Solve →
7 Reverse Integer Math Medium Solve →
8 Contains Duplicate Sorting + Hash Table Easy Solve →
9 Spiral Matrix Simulation + Matrix Medium Solve →
10 Subarray Sum Equals K Prefix Sum Medium Solve →
11 Check if Array Is Sorted and Rotated Array Easy LeetCode →
12 Pow(x, n) Recursion + Math Medium LeetCode →
13 Zigzag Grid Traversal With Skip Simulation + Matrix Easy LeetCode →
14 Count the Digits That Divide a Number Math Easy LeetCode →

Sliding Window & Two Pointers

Linear-time scans over arrays and strings. High volume, low variance — these should be automatic. Showing the top 14 of 17 on the list.

# Problem Pattern Difficulty Link
15 Container With Most Water Greedy + Two Pointers Medium Solve →
16 Move Zeroes Two Pointers Easy Solve →
17 3Sum Two Pointers Medium Solve →
18 Longest Substring Without Repeating Characters Sliding Window Medium Solve →
19 Reverse String Two Pointers Easy Solve →
20 Sort Colors Bubble Sort + Quicksort Medium Solve →
21 Remove Duplicates from Sorted Array Two Pointers Easy Solve →
22 Merge Sorted Array Two Pointers Easy Solve →
23 Rotate Array Two Pointers Medium Solve →
24 Valid Palindrome Two Pointers Easy Solve →
25 Contains Duplicate II Sliding Window Easy Solve →
26 Maximum Average Subarray I Sliding Window Easy LeetCode →
27 4Sum Two Pointers Medium Solve →
28 Squares of a Sorted Array Two Pointers Easy Solve →

Dynamic Programming

State definition is the whole battle. Say the recurrence out loud before you write the table. Showing the top 14 of 15 on the list.

# Problem Pattern Difficulty Link
29 Maximum Subarray Divide and Conquer + DP Medium Solve →
30 Best Time to Buy and Sell Stock DP Easy Solve →
31 Fibonacci Number Memoization + DP Easy Solve →
32 Jump Game Greedy + DP Medium Solve →
33 Maximum Product Subarray DP Medium Solve →
34 Climbing Stairs Memoization + DP Easy Solve →
35 Trapping Rain Water Monotonic Stack + Two Pointers Hard Solve →
36 Palindrome Partitioning IV DP Hard LeetCode →
37 Bitwise ORs of Subarrays Bit Manipulation + DP Medium LeetCode →
38 Burst Balloons DP Hard Solve →
39 House Robber DP Medium Solve →
40 Smallest Sufficient Team Bitmask + Bit Manipulation Hard LeetCode →
41 Split Array With Same Average Meet in the Middle + Bitmask Hard LeetCode →
42 Unique Paths Combinatorics + DP Medium Solve →

Half of these are binary search on the answer, not on an array. Learn to spot the monotonic predicate. All 9 on the list.

# Problem Pattern Difficulty Link
43 Median of Two Sorted Arrays Divide and Conquer + Binary Search Hard Solve →
44 Find First and Last Position of Element in Sorted Array Binary Search Medium Solve →
45 Search in Rotated Sorted Array Binary Search Medium Solve →
46 Peak Index in a Mountain Array Ternary Search + Binary Search Medium Solve →
47 Sqrt(x) Newton’s Method + Binary Search Easy Solve →
48 Missing Number Bit Manipulation + Binary Search Easy Solve →
49 Search Insert Position Binary Search Easy Solve →
50 Single Element in a Sorted Array Binary Search Medium Solve →
51 Two Sum II - Input Array Is Sorted Binary Search + Two Pointers Medium Solve →

Strings

Parsing, transformation, and in-place edits. Clarify the character set and whitespace rules before you start. All 6 on the list.

# Problem Pattern Difficulty Link
52 Valid Anagram Sorting + Hash Table Easy Solve →
53 Roman to Integer Math + Hash Table Easy Solve →
54 Integer to Roman Math + Hash Table Medium Solve →
55 Group Anagrams Sorting + Hash Table Medium Solve →
56 Remove Letter To Equalize Frequency Counting + Hash Table Easy LeetCode →
57 Length of Last Word String Easy Solve →

Math & Bit Manipulation

Number theory, geometry, and bit tricks. Short to write, easy to get subtly wrong on overflow and sign. All 4 on the list.

# Problem Pattern Difficulty Link
58 Single Number Bit Manipulation Easy Solve →
59 Minimum Cuts to Divide a Circle Geometry Easy LeetCode →
60 Add Binary Bit Manipulation Easy Solve →
61 Count Primes Prime Number Sieve + Primality Test Medium Solve →

Prefix structures and substring matching. Common wherever autocomplete or search is part of the product. All 3 on the list.

# Problem Pattern Difficulty Link
62 Longest Palindromic Substring Manacher + Two Pointers Medium Solve →
63 Longest Common Prefix Trie Easy Solve →
64 Find the Index of the First Occurrence in a String Boyer–Moore String-Search Algorithm + KMP Easy Solve →

Heap / Priority Queue

Top-k, streaming medians, and scheduling. Usually the difference between a passing and a timing-out solution. All 3 on the list.

# Problem Pattern Difficulty Link
65 Task Scheduler Heap + Greedy Medium Solve →
66 Minimum Operations to Exceed Threshold Value II Heap Medium LeetCode →
67 Sort an Array Radix Sort + Counting Sort Medium LeetCode →

Trees

Recursion discipline: what you return up, what you pass down. Follow-ups usually push from recursive to iterative. All 2 on the list.

# Problem Pattern Difficulty Link
68 Largest Rectangle in Histogram Range Query + Monotonic Stack Hard Solve →
69 Kth Smallest Element in a BST BST + Binary Tree Medium Solve →

Stack & Monotonic Stack

Nearest-greater, parsing, and span problems. The monotonic variant is the one people miss. All 2 on the list.

# Problem Pattern Difficulty Link
70 Valid Parentheses Bracket Sequences + Stack Easy Solve →
71 First Unique Character in a String Queue Easy Solve →

Intervals, Greedy & Sorting

Sort, then make a local decision you can defend. Expect to justify why greedy is safe here. All 2 on the list.

# Problem Pattern Difficulty Link
72 Majority Element Boyer-Moore + Divide and Conquer Easy Solve →
73 Merge Intervals Quicksort Medium Solve →

TCS’s Favourite Patterns (Ranked)

Rank Pattern Frequency Problems on list Start with
1 Arrays & Hashing Very High 23 (26%) Friday Purchases I, Two Sum, Palindrome Number
2 Sliding Window & Two Pointers High 17 (19%) Container With Most Water, Move Zeroes, 3Sum
3 Dynamic Programming High 15 (17%) Maximum Subarray, Best Time to Buy and Sell Stock, Fibonacci Number
4 Binary Search Medium-High 9 (10%) Median of Two Sorted Arrays, Find First and Last Position of Element in Sorted Array, Search in Rotated Sorted Array
5 Strings Medium-High 6 (7%) Valid Anagram, Roman to Integer, Integer to Roman
6 Math & Bit Manipulation Medium-High 4 (4%) Single Number, Minimum Cuts to Divide a Circle, Add Binary
7 Tries & String Search Medium 3 (3%) Longest Palindromic Substring, Longest Common Prefix, Find the Index of the First Occurrence in a String
8 Heap / Priority Queue Medium 3 (3%) Task Scheduler, Minimum Operations to Exceed Threshold Value II, Sort an Array
9 Trees Medium 2 (2%) Largest Rectangle in Histogram, Kth Smallest Element in a BST
10 Stack & Monotonic Stack Medium 2 (2%) Valid Parentheses, First Unique Character in a String

How to read this: the top three rows are where your preparation hours should go. A candidate fluent in Arrays & Hashing, Sliding Window & Two Pointers, Dynamic Programming covers the bulk of what TCS actually asks. The rest is insurance for the one round that goes somewhere unexpected.


The NQT, Section by Section

This is the table to plan your preparation around, because the test decides the outcome for most candidates and the interviews only confirm it.

Section What it asks Why it eliminates people What to practice
Numerical Ability Percentages, ratio and proportion, time speed distance, time and work, averages, profit and loss, probability, permutations, mensuration Enough questions to leave roughly a minute each, so slow but correct arithmetic still fails Timed sets, mental shortcuts, and knowing which questions to skip immediately
Verbal Ability Reading comprehension, sentence completion, para jumbles, synonyms and antonyms, error spotting Non-native speakers under-prepare here and lose marks that are easier than the quantitative ones Daily reading plus a fixed routine for comprehension passages
Reasoning Ability Number and letter series, blood relations, directions, syllogisms, seating arrangement, data interpretation, data sufficiency Puzzle-style questions eat time if you start drawing before reading all the constraints Full puzzle sets under time, with a hard rule on abandoning a puzzle
Advanced Quantitative Harder versions of the same arithmetic plus more data interpretation Only attempted seriously by candidates targeting the higher tracks The same topics at a harder level, timed
Advanced Reasoning Multi-constraint puzzles, logical deduction Same trap as the Foundation reasoning, with less time per question Constraint-table method, written out
Hands-on Coding One to three programming problems in C, C++, Java or Python Strict input and output formats, and no partial credit for a near-miss Easy-to-medium problems typed in a plain editor with exact print formatting

Two mechanical habits make a visible difference. Read every question before you attempt anything in a section so you know where the easy marks are, and treat the output format of a coding problem as part of the problem rather than an afterthought.


Ninja, Digital and Prime: What Actually Differs

The same test, three different jobs. Candidates often discover the distinction after the result, which is the wrong order.

Track How you land it What the technical interview covers What to prepare differently
Ninja Clear the NQT Foundation section at the Ninja cut-off Project walkthrough, one language in reasonable depth, basic DBMS and OS, occasionally a simple program Aptitude first, then one language you can write confidently without an IDE
Digital Clear Foundation plus the Advanced section at the Digital cut-off Fundamentals across DBMS, operating systems, networks and OOP, SQL queries, one or two coding questions at easy-to-medium level Advanced quantitative work plus real coding practice, and SQL you can write on paper
Prime The highest NQT performance, usually including a strong Advanced and coding score Everything in the Digital round, pushed deeper, plus a serious project deep dive — recent reports describe data and AI projects being probed hard A project you built and can defend end to end, plus medium-level DSA rather than syntax recall

The packages differ substantially between these tracks, and they are revised every hiring cycle, so treat any figure you read as dated. The useful planning fact is simpler: the gap between Ninja and Prime preparation is one Advanced section and one defensible project, which is a much smaller investment than the difference in outcome suggests.


Managerial and HR Round Questions

# Question
1 Are you willing to relocate to any TCS location in India at short notice?
2 Are you comfortable with rotational or night shifts if the client needs them?
3 Which technology do you want to work on, and what will you do if you are allocated something else?
4 Walk me through your final-year project and tell me which part you wrote yourself.
5 Tell me about a disagreement inside a team project and how it was resolved.
6 How do you handle a deadline you already know you are going to miss?
7 Why TCS, and what do you understand about the service agreement?
8 Where do you see yourself in three years if your first project is maintenance work?
9 Tell me about something technical you learned on your own, with no course or mentor.

The answers that cost people offers here are the conditional ones. “I can relocate, but only to Pune” reads as a deployment risk, and deployability onto client projects is exactly what this round is measuring. Either say yes and mean it, or say no and give a real reason. The same applies to backlogs, gaps and year drops — state them plainly, because the verification step will surface them anyway and an inconsistency is far more damaging than the fact itself.


14-Day Prep Plan

Built from the pattern ranking above, so the heaviest topics get the most time.

Day Focus Problems
1 Arrays & Hashing (part 1) Friday Purchases I, Two Sum, Palindrome Number
2 Arrays & Hashing (part 2) Rank Transform of an Array, Second Highest Salary, First Missing Positive
3 Sliding Window & Two Pointers (part 1) Container With Most Water, Move Zeroes, 3Sum
4 Sliding Window & Two Pointers (part 2) Longest Substring Without Repeating Characters, Reverse String, Sort Colors
5 Dynamic Programming (part 1) Maximum Subarray, Best Time to Buy and Sell Stock, Fibonacci Number
6 Dynamic Programming (part 2) Jump Game, Maximum Product Subarray, Climbing Stairs
7 Binary Search Median of Two Sorted Arrays, Find First and Last Position of Element in Sorted Array, Search in Rotated Sorted Array
8 Strings Valid Anagram, Roman to Integer, Integer to Roman
9 Math & Bit Manipulation Single Number, Minimum Cuts to Divide a Circle, Add Binary
10 Tries & String Search Longest Palindromic Substring, Longest Common Prefix, Find the Index of the First Occurrence in a String
11 Heap / Priority Queue Task Scheduler, Minimum Operations to Exceed Threshold Value II, Sort an Array
12 Mock round Two problems in 45 minutes, timed, no hints. Simulate the real round.
13 Revision Redo the problems you failed or needed a hint on.
14 Light review + rest Re-read your pattern notes. Sleep early.

Tips for TCS Interviews

  1. Treat aptitude as the main subject. Time per question is the binding constraint, not difficulty. Drill percentages, ratios, time and work, probability, number series, blood relations, syllogisms, data interpretation and reading comprehension against a clock until you stop needing scratch paper for the easy ones.
  2. Decide now whether you are chasing Digital or Prime. That decision changes your plan: the Advanced section needs harder quantitative work plus genuine coding practice, not just more Foundation revision. Going in undecided means defaulting to Ninja.
  3. Learn the coding platform before test day. TCS runs its own environment, and reports regularly mention a restricted editor, fixed input and output formats, and no partial credit for a near-miss. Practice reading input exactly as specified and printing exactly what is asked, including spacing, because format mistakes fail otherwise-correct solutions.
  4. Revise CS fundamentals as a list you can close out. DBMS normalisation, joins, keys, ACID and indexes; OS process versus thread, deadlock, scheduling and paging; networks with the OSI layers, TCP versus UDP and DNS; plus SQL queries you can write by hand. These are asked as direct recall questions, which makes them the cheapest marks in the loop.
  5. Know your own project at claim level. Interviewers pick the most impressive line on your CV and push on it for several minutes. If you cannot say which part you built, what the data looked like and what you would change, drop the claim before the interview rather than defend it badly in the room.
  6. Rehearse the HR answers out loud in English. Fluency is scored informally in every round, and candidates deployed onto client projects are expected to hold a call. Speaking your relocation, shift and service-agreement answers aloud a few times beats having a better answer you deliver hesitantly.

Other Company Prep


Section timings, round structures and track cut-offs here reflect commonly reported candidate experience rather than published documentation, and TCS revises the NQT pattern between hiring cycles. Compensation for the Ninja, Digital and Prime tracks changes every year and is deliberately not quoted on this page. Confirm the current pattern, eligibility criteria and round list in the official notification for your own drive.