VOOZH about

URL: https://www.geeksforgeeks.org/interview-experiences/tcs-nqt-interview-experience-off-campus-2024/

⇱ TCS NQT Interview Experience (Off-Campus) 2024 - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

TCS NQT Interview Experience (Off-Campus) 2024

Last Updated : 17 May, 2024

In recent years, the TCS National Qualifier Test (NQT) has become a gateway for many aspiring candidates to kickstart their careers in the tech industry. However, the coding section of the exam has been a subject of debate among candidates due to its ambiguous and sometimes inadequately described questions. In this article, we'll dissect one such coding question from the TCS NQT conducted on April 26th, 2024, shedding light on the issues with its description and providing a detailed example.

The Problem:

One of the questions posed in the coding section of the TCS NQT on April 26th, 2024, revolved around finding all subarrays of a given array whose sum of elements is equal to a specified value, let's call it K.

The Issue:

The problem statement lacked clarity, especially concerning how input should be handled when the size of the array is not provided upfront. Moreover, it failed to specify how input containing non-integer characters should be managed, leading to confusion among candidates.

An Example:

Consider the following input scenario:

Input: 1 2 3 4 5 -4 -3 ,10

In this example, the input consists of integers separated by spaces, with a comma separating the array from the specified value of K, which is 10. However, the problem statement does not clarify how to handle non-integer characters like commas in the input.

The Solution:

To address the ambiguity in the problem statement, let's provide a solution along with the necessary input handling. Below is the code snippet demonstrating how to handle input until a non-integer character is encountered:

Conclusion:

The TCS NQT coding questions often present challenges due to their vague descriptions and ambiguous requirements. As demonstrated in this article, candidates need to be equipped with not only coding skills but also the ability to interpret and clarify unclear problem statements. It's crucial for examination authorities to provide well-defined questions to ensure a fair and accurate assessment of candidates' abilities.

Exact Solution For the Above Question :


Comment