Tip 1: Be confident in every situation.
Tip 2: Practice DSA questions.
Tip 3: Complete at least two good projects with a solid understanding of each.
Tip 1: Have 2-3 good projects on your resume.
Tip 2: Your resume should show every skill you have.
The first round of my TCS NQT consisted of multiple-choice questions covering verbal ability, reasoning ability, and numerical ability. Additionally, there was a programming logic section with two coding questions. In this mcq's were medium to hard level. There were two coding questions ranging from 1- easy and 1 - medium level. There were batches assigned and every batch got there 3hr time for this round.
The given array is sorted in non-decreasing order.
It was a simple question where we just need put all the zeros to the end of array.
To solve this problem, I implemented a two-pointer approach. I used one pointer to scan through the array and another to keep track of the position where non-zero elements should be placed. As I iterated through the array, I moved all non-zero elements to the front, effectively pushing the zeros (empty packets) to the end. This solution had a time complexity of O(n) and didn't require extra space, making it efficient for large inputs.
1. The array consists of only 3 distinct integers 0, 1, 2.
2. The array is non-empty.
Tip 1: Analyze problems before coding.
Tip 2: Use elimination for tricky MCQs.
Tip 3: Manage time: quick solves first, flag difficult ones.
My second round was an in-depth technical interview. It began with two coding challenges: the 'Rat in a Maze' problem, which tests recursive backtracking skills, and a LinkedList question, likely focusing on data structure manipulation. I explained my approach and coded solutions for both.
The interviewer then probed my knowledge of computer networks, asking about key protocols and concepts. For SQL, I was asked to write and explain several queries, demonstrating my database skills.
We concluded by discussing my project. I outlined its purpose, my role, the technologies used, and the challenges I overcame. This allowed me to showcase my practical experience and problem-solving abilities in a real-world context.
Throughout the interview, I focused on clear communication and logical thinking, aiming to demonstrate both my technical skills and my ability to apply them practically.
Here, sorted paths mean that the expected output should be in alphabetical order.
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1
Expected Output:
DDRDRR DRDDRR
i.e. Path-1: DDRDRR and Path-2: DRDDRR
The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
First I implemented a naive approach and then I implemented a depth-first search (DFS) with pruning. Instead of checking all four directions at each step, I used a direction array to streamline movement choices. I also incorporated visited marking directly in the input matrix to save space.
To further optimize, I used a single string to build the path, appending and removing characters as I moved, rather than creating new strings for each path. This reduced memory usage.
For additional efficiency, I implemented early termination: if the rat reached a dead end, I immediately backtracked without exploring further. These optimizations improved both time and space complexity, making the solution more efficient for larger mazes.
In the third round, I had a standard HR interview. The discussion covered my background, career goals, and reasons for choosing TCS. We talked about my understanding of the company's culture and values. The interviewer asked about my strengths, weaknesses, and how I handle challenges. We also discussed my expectations from the role and my long-term career plans. The conversation was professional yet relaxed, allowing me to express my enthusiasm for joining TCS and my fit with the organization.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What does ROLLBACK do in DBMS?
They are asking rat in a maze and linked list questions in a TCS interview , wow , for what role you gave this interview, I mean digital or prime