Tcs Coding Questions 2021 [upd] Online

candies, update the jar or return "INVALID INPUT" if the request exceeds current stock. If stock falls below a threshold , refill it.

: Finding the second largest/smallest element, rotating an array by positions, and finding missing numbers in a sequence. String Manipulation Tcs Coding Questions 2021

The TCS National Qualifier Test (NQT) is a crucial step for placement. In 2021, the coding section generally consisted of to be solved in 45 minutes . candies, update the jar or return "INVALID INPUT"

TCS often tests base conversions. In 2021, a specific challenge involved converting a number from (using A=10, B=11... G=16) to decimal (Base 10). → Output: 4. Cyclically Rotate an Array The Problem: Given an array of integers and a value , rotate the array clockwise by positions. [10, 20, 30, 40, 50] → Output: [40, 50, 10, 20, 30] Use the formula (index + K) % N String Manipulation The TCS National Qualifier Test (NQT)

Example: Input - [-2, 1, -3, 4, -1, 2, 1, -5, 4], Output - 6