Tcs Coding Questions 2021 ((top)) Jun 2026
: Focused on basic data structures, arrays, strings, or number theory. (Time limit: 15 minutes).
The 2021 question bank heavily favored problem-solving over syntax memorization. The distribution of questions leaned on the following core domains:
coins. Find the number of ways to pick one coin from each such that their product is an even number Quick Logic: A product is even if at least one of the numbers is even. Total Ways
7 7 3 2 4 9 12 56 3
Selection of trainees for a fitness test depends on their oxygen levels. Three trainees undergo running tests for 3 rounds. The oxygen level of each trainee is measured after each round.You are given the oxygen levels of all 3 trainees for all 3 rounds (total 9 inputs consecutively: Trainee 1 Round 1, Trainee 2 Round 1, Trainee 3 Round 1, Trainee 1 Round 2, etc.).Calculate the average oxygen level for each trainee. Find the fittest trainee(s) with the highest average oxygen level.
Remove all characters except alphabets from a given string. 3. Solved Examples from TCS NQT 2021 Example 1: TCS NQT 2021 Candy JAR Problem
Questions in 2021 were often , requiring candidates to parse lengthy descriptions to find the underlying algorithmic problem. 1. Array & String Manipulation Tcs Coding Questions 2021
Comprehensive Guide to TCS Coding Questions 2021: Topics, Patterns, and Solutions
An international organization defines a "Prime Minister" number as a positive integer greater than 10 that satisfies two conditions:
Accept a string and an integer K . Shift every character in the string K positions forward in the alphabet. (Assume the string contains only lowercase alphabets). If the shift goes past 'z', wrap around to 'a'. : Focused on basic data structures, arrays, strings,
If any trainee's average oxygen level is below 70, declare them unfit. If all trainees have an average below 70, output "All trainees are unfit". Input Format
Wait – clarify: Better example: arr = [1, 2, 3, 4, 3], K = 6 Pairs: (2,4) and (3,3) → 2 pairs.