Panda Guru LogoPanda
Guru

TCS Codevita TAG exam 2025

Round 1

Questions:

  1. Question 1: Given three items with their quantities and an additional number n, print all possible combinations of these elements of length n in a specific sequence order. The time allotted for this question was 30 minutes. There was no submit button; the best score was based on the number of test cases passed (both private and public). The compiler used did not allow for personal prints for public test cases, complicating debugging.

  2. Question 2: You are given an array of n numbers. Your task is to create a fence consisting of two poles of equal length and find the maximum height of this fence. You can join the elements into two disjoint sets of your choice to form the rods for the fence. The time allotted for this question was 60 minutes. The input array was provided directly, and the length of the array was not mentioned beforehand. For example, given arr = [2, 4, 3, 6], the answer would be 6 because (2, 4) and (6) would make a fence.

Candidate's Approach

For the first question, the candidate was able to solve the combinations variant in 7-8 minutes. Despite the difficulty faced by many candidates, the candidate successfully completed this question.

For the second question, the candidate solved it by identifying the maximum height of the fence that could be formed from the given array. The candidate noted the lack of constraints provided for this question.

Interviewer's Feedback

No feedback provided.