Tcs Coding Questions 2021 !!exclusive!!
TCS Coding Questions 2021 – Full Practice Paper
Instructions:
- Solve the following coding problems.
- Time limit: 60 minutes (for all 6).
- Languages allowed: C, C++, Java, Python.
- Each question carries 10–15 marks.
- Focus on edge cases and time complexity.
Example:
Input: "a,b$c"
Output: "c,b$a"
Based on 2021 slot analyses, questions were primarily drawn from these core areas: Tcs Coding Questions 2021
Example:
Input: arr = [1, 5, 7, 1, 5], K = 6
Pairs: (1,5) at indices (0,1) and (0,3), but unique values?
Here values (1,5) is one pair. So answer = 1. TCS Coding Questions 2021 – Full Practice Paper
Approach (Logic): Manage four boundaries: top, bottom, left, right. Loop while top <= bottom and left <= right. Solve the following coding problems
candies, update the jar or return "INVALID INPUT" if the request exceeds current stock. If stock falls below a threshold , refill it.
3. The "String Palindrome with One Skip"
Asked in: TCS NQT Advanced (July 2021)