TCS
Past question patterns, MockVita strategy, Ninja vs Digital track breakdown, and an 8-week roadmap. Registration is open now at codevita.tcsapps.com — peak search window is the next 2–4 weeks.
Format
6 problems / 6 hours
Max CTC
₹14 LPA (Digital)
Eligible Batches
2027–2030
Registration
Open Now
Registration + Verification window is currently open — MockVita dry runs are coming up next. Register before slots fill at your college.
Excellent for freshers
6–10 weeks
No
Enter your email and we'll send it straight to your inbox.
The most direct route into TCS without campus placement
TCS CodeVita is a global individual coding competition that doubles as a direct hiring channel. A qualifying global rank gives you a TCS offer letter — no campus drive, no aptitude test, no HR round required. It is open to students from Batches 2027, 2028, 2029, and 2030, across all engineering and science disciplines.
Format
6 coding problems, 6 hours, individual
Hiring output
Direct offer: Ninja (₹7 LPA) or Digital (₹14 LPA)
No campus needed
Off-campus students can register directly at codevita.tcsapps.com
The same contest, the same 6 problems. Your rank and solve count determine which track you qualify for. Set your target before you start preparing — the required depth is completely different.
Problems needed
1–2 problems solved
Rank needed
Any global rank
Role profile
Application support, business operations, standard engineering projects
Prep target
LeetCode Easy–Medium (100 problems). Focus: arrays, strings, basic graph traversal, number theory.
Problems needed
3–4 problems solved
Rank needed
Top ~500 Indian rank
Role profile
Digital transformation projects, cloud, AI/ML, advanced engineering roles
Prep target
LeetCode Medium–Hard (200 problems) + Codeforces Div. 2 A–C. Add: DP, advanced graphs, string algorithms.
Problems needed
4–6 problems solved
Rank needed
Top 30 globally
Role profile
Elite research and innovation teams, direct placement into advanced projects
Prep target
Codeforces Specialist+ (1400+), LeetCode Knight (1800+). Geometry, advanced trees, competitive math.
CodeVita problems are themed as stories — "The Magical Town", "The Treasure Hunt", "The Spell Book". The stories rotate every season; the underlying algorithm patterns don't. These 7 patterns cover the vast majority of what has appeared across Seasons 9–13.
A town has N buildings connected by M roads. Find the shortest path between two specific buildings, with some roads blocked at certain times of day. A variant adds a constraint: you can remove at most K roads before travelling.
Approach
Dijkstra's algorithm for the base case. For the K-road-removal variant, modified Dijkstra with a state (node, removals_used). Time: O((N + M) log N). Space: O(N + M).
Graph traversal with constraints is a CodeVita staple — it appears in ~60% of contests under different story wrappings.
An M×N grid has treasures, walls, and traps. Find the path from top-left to bottom-right that collects maximum treasure, where traps reduce your score. Extended variant: path must visit exactly K treasure cells.
Approach
Standard 2D DP: dp[i][j] = max treasure reaching (i,j). For K-cell variant, add a third dimension: dp[i][j][k] = max treasure at (i,j) having collected k treasures. Time: O(M × N × K).
Grid DP with constraints is asked in almost every CodeVita season. The story changes; the approach doesn't.
Given a long "scroll" string and a list of "spell" patterns, count how many spells appear in the scroll. A variant asks for the minimum number of character replacements to make a spell appear.
Approach
Multi-pattern search: Aho-Corasick algorithm for counting all pattern occurrences in O(N + M + Z) where Z is match count. For the replacement variant: edit distance (DP) per pattern. For competitive rank, KMP over naive search.
String problems with thematic wrapping appear in every season. KMP or Rabin-Karp is usually sufficient for Ninja-track solutions; Aho-Corasick for full score.
A merchant can attend N trade fairs, each with a start time, end time, and profit. Find the maximum profit achievable without overlapping fairs. Extended variant: merchant can skip at most K fairs per day.
Approach
Weighted Job Scheduling: sort by end time, use DP + binary search (lower_bound on end times). dp[i] = max profit considering first i jobs. Time: O(N log N). This is LeetCode 1235 "Maximum Profit in Job Scheduling".
Interval scheduling with profit is a recurring CodeVita theme. Pure greedy (without weights) is insufficient — you need DP + binary search for full marks.
Given N numbers, find all prime numbers in the range, count numbers with exactly K prime factors, or find the GCD of all numbers that are products of two primes (semiprimes). Variants include modular exponentiation questions.
Approach
Sieve of Eratosthenes for all primes up to 10^6 in O(N log log N). Smallest Prime Factor (SPF) sieve for prime factorisation of each number in O(1) per query after O(N log log N) preprocessing.
Number theory problems are consistently the "easiest" CodeVita problem — a guaranteed solve for prepared participants. Always attempt this first.
Given a rooted tree with weighted nodes, find the maximum sum path between any two nodes. Extended variant: find the K-th ancestor of a node, or count paths where the sum equals exactly X.
Approach
Tree diameter: two DFS passes. Max path sum: DFS tracking max path through each node as root. LCA for K-th ancestor: binary lifting (sparse table), O(N log N) preprocessing, O(log N) per query. Path sum = X: DFS + prefix sum hashmap.
Tree problems separate Digital-track from Ninja-track participants. If you can solve the tree problem, you're in Digital territory.
Boxes arrive in a specific order and must be dispatched in a target order. Determine the minimum number of stacks (or moves) needed. Variant: given a sequence of push/pop operations, detect if a target permutation is achievable.
Approach
Stack simulation: greedily push and pop. For minimum stacks, use a greedy approach tracking available stack tops. Time: O(N log N) with a sorted structure for available tops. This is similar to LeetCode 1172 "Dinner Plate Stacks".
Stack-based simulation is a reliable Medium-easy problem in CodeVita. Usually solvable in 30–40 minutes — good for early time banking.
Most students read the pattern and move on. The ones who get placed practice it. Get the TCS CodeVita question bank — real questions, model answers, verified by 2024–25 placed students.
MockVita is TCS's official practice contest on the real CodeVita platform. Most candidates treat it as optional. It isn't — it's the only chance to find friction in your contest workflow before it costs you rank.
Rule 01
Set a 6-hour block, close all distractions, and use only the CodeVita IDE. The goal is to find friction in your workflow before exam day, not to get easy practice. Most candidates fail to finish problems in the real contest because they never trained under 6-hour time pressure.
Rule 02
Scan every problem statement before writing a single line of code. Identify: (1) which problem has the simplest I/O, (2) which one matches your strongest topic, (3) which ones to skip. CodeVita problems are wordy — the actual algorithm is usually 20% of the statement. Find it fast.
Rule 03
Every CodeVita contest has at least one number theory or simple simulation problem. Solving it in the first 45 minutes banks guaranteed points and rank. Attempting hard graph problems first under pressure and failing costs more time than it's worth.
Rule 04
Unlike Codeforces, CodeVita penalises wrong submissions with time additions that affect your rank. Test with the sample cases, then mentally trace 2–3 edge cases (empty input, single element, max constraints) before submitting. One wrong submission on a hard problem can cost you 20+ rank positions.
Rule 05
Python has slower I/O but faster coding. C++ has fast execution but verbose syntax. For CodeVita, Python with sys.stdin is usually fine for Ninja-track problems (most constraints are ≤ 10^5). For Digital-track problems with tight limits (10^6–10^7), C++ is safer. Decide your language stack before the contest — never mid-contest.
Rule 06
After each MockVita round, TCS typically keeps the problems accessible for a period. Re-solve every problem you couldn't finish during the dry run — specifically focus on understanding why your approach failed, not just copying a working solution. This is the highest-leverage post-contest activity.
Registration is open now. MockVita dry runs typically run 4–6 weeks before the main contest. Use this roadmap from today — 8 weeks is the realistic window before search volume drops.
Weeks 1–2
Weeks 3–4
Weeks 5–6
Weeks 7–8
Registration portal
codevita.tcsapps.com — registration and verification window is currently open for Season 13. MockVita dates will be announced via email after registration.
Every Graph, DP, and String algorithm template you need — mapped to the exact CodeVita problem types.
Get the Complete 22 PDF Bundle — ₹79Ninja & Digital track patterns · 7 CodeVita algorithm types · MockVita templates · 22 curated PDFs
TCS NQT 2026 Guide
Ninja / Digital / Prime — aptitude + coding
Technical Round Simulator
Timed coding practice at CodeVita difficulty
DSA Progress Tracker
Track problems solved by topic and difficulty
These free tools cover everything you need for placement prep.
Timed mock tests — TCS NQT, Infosys, Wipro, Accenture patterns. Proctored mode with real grading.
Practice HR, Technical & Behavioral rounds with per-answer AI feedback. Facial expression analysis included.
100+ DSA problems in a real interview environment — Monaco editor, Python/Java/C++/JS, AI code review.
Preparing for multiple companies? These guides cover the full 2025–26 placement season.
Ninja → Digital → Prime roles in one test
Elite coding competition → SP/PP roles
Earn while you learn — sponsored M.Tech
GenC → GenC Elevate → GenC Next tracks
Analyst → Analyst Star → Senior Analyst
ASE → AASE → AE — full-stack evaluation
Also check out our Aptitude Simulator and Placement Roadmap for a complete prep plan.
View all company roadmaps