Tcs Coding Questions 2021 Extra Quality <Easy · 2026>

Input: "a,b$c" Output: "c,b$a"

The year 2021 was a transformative period for the recruitment process, particularly with the widespread adoption of the National Qualifier Test (NQT) . This period saw a significant shift toward automated coding assessments that tested not just basic logic, but also mathematical aptitude and real-time problem-solving under strict time constraints.

Easy Marks: 10

s = input().strip() count = 0 i = 0 while i < len(s): if s[i] == '1': count += 1 while i < len(s) and s[i] == '1': i += 1 else: i += 1 print(count)

: Given two non-negative integers n1 and n2 , find the count of all numbers in the range from n1 to n2 (inclusive) that have no repeated digits . Example : n1=11 , n2=15 . The numbers 12, 13, 14, 15 have no repeated digits. So, the output is 4 . Sample Solution (C++) : Tcs Coding Questions 2021

The platform supported multiple languages including C, C++, Java, Python, and Perl. Code was evaluated against visible and hidden test cases with strict execution time limits (typically 1.0 to 2.0 seconds). Core Topics Tested in 2021

Ensure your code handles zero inputs, negative values, empty strings, and exceedingly large integer sizes. Use long long in C++ and long in Java when computing deep factorials or large products. Input: "a,b$c" Output: "c,b$a" The year 2021 was

Focused on basic data structures, array manipulations, string processing, and basic mathematical logic (e.g., loops, conditional statements).

Given a string, check if it's a palindrome or not. Example : n1=11 , n2=15

Prime/Armstrong/Harshad numbers, GCD/LCM, Fibonacci series, base conversion. Scenario-Based

Mastering TCS Coding Questions: A Comprehensive Guide to 2021 Exam Patterns