Tools
Back to Company Prep

TCS

CodeVita Season 13 2026 — Complete Prep Guide

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.

Register Now

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.

codevita.tcsapps.com →
16 min read
2026 Pattern
For Freshers?

Excellent for freshers

Difficulty Level
Hard
Prep Time

6–10 weeks

Negative Marking

No

Last updated: August 2026
Report an error
Free DownloadNo credit card

Get the 1-Page TCS CodeVita Question Pattern Cheat Sheet — Free

Enter your email and we'll send it straight to your inbox.

  • Top 7 problem types with algorithm templates (Graph, DP, String, Number Theory)
  • MockVita time-allocation strategy — which problem type to attempt first
  • Ninja vs Digital solve-count targets with rank benchmarks
  • Input/output format quirks specific to the CodeVita IDE

We'll also send you one follow-up email about our ₹79 bundle. That's it.

What is TCS CodeVita?

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

Key advantage over NQT: CodeVita is purely coding-based — no verbal, no quant, no essay. If you can code well, this is a faster path to a TCS Digital offer than the NQT route.

Ninja vs Digital — What You Actually Need

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.

TCS Ninja

₹3.36–7 LPA

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.

TCS Digital

₹7–14 LPA

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.

TCS Prime / Global Rank

₹9–14 LPA

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.

Requires competitive programming background
Realistic target for most students: Aim for TCS Digital (₹7–14 LPA) — solve 3 problems cleanly with zero wrong submissions. That beats a messy 4-problem attempt with penalty time in rank terms. Partial credit on a 4th problem is a bonus, not a goal.

Past Question Patterns — Seasons 9–13

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.

The Magical Town (Graph — BFS/Shortest Path)

MediumSeason 10–12

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).

GraphBFSDijkstra'sShortest Path

Graph traversal with constraints is a CodeVita staple — it appears in ~60% of contests under different story wrappings.

The Treasure Hunt (2D Grid DP)

MediumSeason 11–12

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).

DP2D GridMemoizationPath Finding

Grid DP with constraints is asked in almost every CodeVita season. The story changes; the approach doesn't.

The Spell Book (String Pattern Matching)

MediumSeason 9–12

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.

StringKMPAho-CorasickPattern Matching

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.

The Merchant's Problem (Greedy + Interval Scheduling)

Medium-HardSeason 10–13

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".

GreedyDPBinary SearchInterval Scheduling

Interval scheduling with profit is a recurring CodeVita theme. Pure greedy (without weights) is insufficient — you need DP + binary search for full marks.

The Prime Kingdom (Number Theory)

Easy-MediumSeason 9–12

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 TheorySievePrime FactorisationGCD

Number theory problems are consistently the "easiest" CodeVita problem — a guaranteed solve for prepared participants. Always attempt this first.

The Forest of Nodes (Tree DP / LCA)

HardSeason 11–13

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.

TreeDFSDP on TreesLCABinary Lifting

Tree problems separate Digital-track from Ninja-track participants. If you can solve the tree problem, you're in Digital territory.

The Warehouse Sorter (Simulation / Stack)

EasySeason 9–13

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".

StackSimulationGreedy

Stack-based simulation is a reliable Medium-easy problem in CodeVita. Usually solvable in 30–40 minutes — good for early time banking.

Problem selection order on contest day: Start with Number Theory (guaranteed easy solve) → Stack Simulation → Grid DP → Graph problem. Save the Tree DP and advanced String problems for last. This order banks guaranteed points early and leaves the high-variance problems for when you have time to think.

MockVita Strategy — 6 Rules for the Dry Run

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

Treat it like the real contest — no shortcuts

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

Read all 6 problems in the first 15 minutes

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

Solve easy/number-theory problem first, always

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

Minimise wrong submissions — penalty time kills rank

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

Use the language you're fastest in, not the "best" one

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

Solve past MockVita problems after the dry run ends

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.

8-Week Prep Roadmap

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

Foundation

  • Register at codevita.tcsapps.com
  • Number Theory: Sieve of Eratosthenes, SPF sieve, modular arithmetic
  • Stack/Queue simulation: 20 LeetCode Easy problems
  • Practice reading verbose problem statements fast — time yourself

Weeks 3–4

Core Patterns

  • Graph: BFS, DFS, Dijkstra — 15 LeetCode Medium graph problems
  • 2D Grid DP: unique paths, coin collection, obstacle variants — 10 problems
  • String algorithms: KMP, Rabin-Karp — 10 LeetCode Medium string problems
  • Participate in MockVita Round 1 if announced

Weeks 5–6

Advanced Patterns

  • Interval scheduling + Weighted Job Scheduling (DP + binary search)
  • Tree DP: diameter, max path sum, LCA with binary lifting
  • Solve 3–5 past CodeVita problems (available after MockVita ends)
  • Full 3-hour mock — pick 3 problems and solve under timed conditions

Weeks 7–8

Contest Simulation

  • Full 6-hour mock using past CodeVita/MockVita problems
  • Review penalty strategy — practise testing edge cases before submitting
  • Participate in MockVita Round 2 if announced
  • Day before: verify system setup, check browser/IDE, sleep 8 hours

Eligibility & Registration

Who can register

Engineering and Science students — all branches
Graduation batches 2027, 2028, 2029, and 2030
No minimum CGPA requirement for registration
Both on-campus and off-campus students eligible
Students who have already appeared in TCS NQT can also register

Constraints to know

No active backlogs at the time of TCS joining — not at registration
Must complete profile verification on codevita.tcsapps.com after registering
Slot allocation: some colleges have limited contest slots — register early
CodeVita offer is separate from NQT — a CodeVita offer directly maps to Ninja or Digital
Penalty time for wrong submissions affects rank — not score directly

Registration portal

codevita.tcsapps.com — registration and verification window is currently open for Season 13. MockVita dates will be announced via email after registration.

Register at codevita.tcsapps.com

Frequently Asked Questions — TCS CodeVita 2026

🚀

Master the CodeVita Pattern — Before the Contest

Every Graph, DP, and String algorithm template you need — mapped to the exact CodeVita problem types.

Get the Complete 22 PDF Bundle — ₹79

Ninja & Digital track patterns · 7 CodeVita algorithm types · MockVita templates · 22 curated PDFs

🛠️

Practice Now — Free Tools for TCS CodeVita

These free tools cover everything you need for placement prep.

🏢

Related Company Prep Guides

Preparing for multiple companies? These guides cover the full 2025–26 placement season.

Also check out our Aptitude Simulator and Placement Roadmap for a complete prep plan.

View all company roadmaps