Panda Guru LogoPanda
Guru

TCS TAG ION TEST 2025 (CODEVITA )

Round 1

Questions:

  1. Easy Question: You are given B balls, C candies, and A balloons and you have to decorate a tree using only n pieces from available balls, candies, and balloons. Print all the ways.

    • Input Format:
      • First line contains n (integer).
      • Second line contains B.
      • Third line contains C.
      • Fourth line contains A.
    • Sample Testcase:
      2 0 1 1
    • Output:
      CA AC
      (AC CA will be considered wrong as it does not follow the order in which they are assuming.)
    • Constraints: 0 <= n, a, b, c <= 100
    • Time: 30 min
  2. Medium Question: A fence can be created using two rods of equal lengths. Find the maximum length of fence that can be created from an array of rods. If no fence can be created, print 0. You are given an array of rods that can be welded together to form new rods.

    • Input Format: An integer array in one line.
    • Sample Testcase:
      1 2 3 6
      
    • Output:
      6
      
    • Constraints: Not given, but they were too low as recursion code was getting accepted.
    • Time: 60 min

Note: You cannot switch back to the previous question once time is over for any question. No copy-paste is allowed; if you try to use ctrl + c, it will delete the whole code. You cannot print any output, and even your code output will be hidden in the compiler.

Candidate's Approach

The candidate focused on understanding the input format as specified in the sample test cases rather than the initial input format lines provided. They suggested using conditional statements to verify inputs against sample test cases to ensure correctness before proceeding with the solution. The candidate emphasized the importance of adjusting the input correctly and checking for errors in the solution due to the time constraints.

Interviewer's Feedback

No feedback provided.