TCS NQT Placement Simulation
Timed campus debugging & logic fixes from TCS National Qualifier Test
Simulate the actual TCS NQT hands-on coding & debugging assessment: 20 curated challenges (10 JavaScript + 10 Python) covering prime number boundaries, string parsing, Fibonacci series, Two Sum map lookups, and loop invariants.
BugHunt Max Placement Exam Simulation (TCS)
Full campus hiring assessment with Bar Raiser AI viva cross-examination, priority queue, and verified certificate badge.
Your Progress
0 of 19 completed
TCS Assessment Questions
Showing 19 debugging challenges
- Q1
Reversing a word never finishes
reverseString(text) returns the text backwards. Example: reverseString("abc") โ "cba".
javascriptmedium - Q2
Capitalize turns "debug" into "Ddebug"
capitalize(word) makes the first letter a capital. Example: capitalize("debug") โ "Debug".
javascripteasy - Q3
Score total turns into NaN
sumScores(players) adds up every player's score. A player with no score counts as 0. Example: [{ score: 10 }, {}, { score: 5 }] โ 15.
javascriptmedium - Q4
Playlist shows undefined as the last song
lastSong(playlist) returns the last song. Example: lastSong(["Intro", "Hook", "Outro"]) โ "Outro".
javascripteasy - Q5
Zero counter also counts "" and false
countZeros(values) counts the entries that are the number 0. Example: countZeros([0, "", false, 0]) โ 2.
javascriptmedium - Q6
Counting odd numbers freezes on an even one
countOdds(nums) counts the odd numbers. Example: countOdds([1, 2, 3]) โ 2.
javascriptmedium - Q7
Counting capitals freezes on a lowercase letter
countUppercase(text) counts the capital letters. Example: countUppercase("aBc") โ 1.
javascriptmedium - Q8
isEven says 4 is not even
isEven(n) returns true when n is even and false when it is odd. Example: isEven(4) โ true, isEven(3) โ false.
javascripteasy - Q9
Adding shipping gives a list of undefined
withShipping(prices) adds 5 for shipping to every price. Example: withShipping([10, 20]) โ [15, 25].
javascripteasy - Q10
Highest price comes back as NaN
highestPrice(prices) returns the biggest price. Example: highestPrice([3, 7, 2]) โ 7.
javascripteasy - Q11
Prime checker thinks 1 is prime
is_prime(n) returns True if n is a prime number. Example: is_prime(7) โ True, is_prime(8) โ False, is_prime(1) โ False.
pythoneasy - Q12
AI Attempt: The palindrome checker
An AI assistant wrote this to check if a word reads the same backwards, ignoring capitals. Example: is_palindrome("Racecar") โ True, is_palindrome("hello") โ False.
pythoneasy - Q13
Vowel counter skips capital letters
count_vowels(text) counts the vowels, capital or small. Example: count_vowels("Apple") โ 2.
pythoneasy - Q14
AI Attempt: Fibonacci starts one step ahead
An AI assistant wrote this for a recursion exercise. fib(n) returns the nth number in 0, 1, 1, 2, 3, 5, 8 โฆ Example: fib(0) โ 0, fib(1) โ 1, fib(6) โ 8.
pythonmedium - Q15
AI Attempt: The Two Sum Trap
An AI assistant wrote this for a classic interview question. has_pair_sum(numbers, target) returns True if two different numbers in the list add up to target. Example: has_pair_sum([1, 2, 3], 5) โ True, has_pair_sum([5], 10) โ False.
pythonmedium - Q16
Duplicate finder reports each duplicate twice
find_duplicates(nums) lists each repeated value once, in the order it first appears. Example: find_duplicates([1, 2, 2, 3]) โ [2].
pythonmedium - Q17
Word search misses a match at the start
mentions(text, word) returns True if word appears anywhere in text. Example: mentions("hello world", "hello") โ True.
pythoneasy - Q18
Countdown never stops
countdown(n) returns a list counting down from n to 1. Example: countdown(3) โ [3, 2, 1].
pythonmedium - Q19
Average of 1 and 2 comes out as 1
average(nums) returns the average of the numbers, including any decimal part. Example: average([1, 2]) โ 1.5.
pythoneasy
More collections to explore
Your First 5 Bugs
Five beginner-friendly bugs with clear symptoms and satisfying fixes. The best place to start if you are new to debugging.
Python Gotchas
Mutable default arguments, list.sort() returning None, and mutating a list while iterating over it.
JavaScript Type Coercion Traps
Accidental string concatenation, array sort ordering numbers alphabetically, and zero being falsely treated as missing.
The Off-By-One Gauntlet
Fencepost errors, inclusive vs exclusive slice bounds, and loops that step one position too far.
Async Nightmares
The asynchronous bugs that silently swallow data: un-awaited promises, forEach loops with async callbacks, and race conditions.
AI Code Comprehension
Simulate modern Code Comprehension rounds: classic coding questions written by an AI that pass the obvious test, but break on subtle edge cases.
Infosys SP / DSE Placement Simulation
20-challenge advanced assessment for Infosys Specialist Programmer (SP) and Digital Specialist Engineer (DSE): 10 JavaScript & 10 Python challenges covering sorting, binary search, sliding window, set mutations, and non-trivial edge conditions.
Amazon SDE OA Simulation
20-challenge rigorous Amazon SDE-1 Online Assessment simulation: 10 JavaScript & 10 Python challenges covering sliding window algorithms, binary search boundaries, asynchronous race conditions, and shared reference mutations.