TCS Prime Interview Experience
Summary
I interviewed for the Prime role at TCS in Lucknow. The interview included discussions on OOPs, pointers, projects, and coding challenges such as a star pattern, Fibonacci series, BST implementation, Tortoise and Hare algorithm, and swapping numbers using pass by value/reference. My results are currently pending.
Full Experience
I had my interview at Lucknow on 17th Jan for the Prime role of TCS.
It was quite a mess before the interview. About 23 of batchmates were selected for the prime role, and only about 10 of us received the mail on 13th Jan that we are gonna get interviewed on 14th Jan at Lucknow TCS Campus. The shocking part was, we all received the mail on 13th Jan about 1:00 PM, and we were all at our homes and for some of us it was almost to reach there by 14th Jan - 9:00 AM.
After talking to the HRs and insisting them a lot the interview was rescheduled for 15th Jan which was again got cancelled and then finally there was an official notice that it's gonna happen at 17th at the same venue. That time was quite hectic and uncertain for some of us.
Let's jump on the main part, we arrived there at 9 AM and firstly there happened the document verification which went on till 11:30 AM.
After the docs verification one by one each candidate was called for the interview. There was a separate panel of three HRs for the prime candidates.
My turn came around 12:20 PM and I went in.
Here are the questions and a few responses of mine which might help some of u to not do the same mistakes that i did. These are the exact answers that I gave.
- Started with the brief intro of mine in which I introduced myself and some of my projects and the experiences.
- They then asked me about my family background, about everone.
- Whether I'll be relocating to the southern part of the country or moved on to London, will I be flexible? And also asked me if my family would be ok with it. I firmly responded with YES.
- Then there was a little discussion on my projects, some basic questions on it, which I answerd with ease.
- Then they asked me about which is my primary programming language, why only this, what do I know about it, some important applications of it where it is usually implemented, etc. So basically C++ was the language related to which i explained them.
- They then hopped on the OOPs concept, asked me the four pillars. The discussion on OOPs lasted around 7-8 minutes in which they asked me a lot of questions, like what is the real life use case, why it was actually improvised, back to 50 years when there were no computers how OOPs can be defined to people. Constructors, destructors, told me write the code on them in a A4 sheet too, which I did smoothly. Shallow copy vs Deep copy.
- Pointers - 'this' keyword, call by value vs call by reference, why pointers, etc.
- Upto here the interview was going very smoothly, and after here I messed up a bit which was quite gruesome. One of the HR took the sheet and wrote a pattern(a basic star pattern) on it, yes a basic one that I used to code blindedly in my first years of college. I messed up the code and he then was quite disappointed on me, then he asked how did u ended up getting selected for the Prime role when u can't even write the basic code that is now even being taught to my kids in the school and hearing those words my confidence shattered and then I started losing myself. After a deep breath, I explained him how I ended up for this interview for this particular role, I told him I gave the TCS NQT exam and solved the first question completely which was an LCS problem of DP, a typical LC problem, and the second problem was also a heavy DP problem for which I was able to pass 4 out of 7 test cases and then he was like OK, and then I took a sigh of relief.
- Then he made me write the recusive, iterative, Memoized code of Fibonacci series, asked me to write the code of BST and told me dry run and explain it, Tortoise- Hare Algo of Linked List, swapping of two numbers using pass by value and pass by reference and there was one more problem which I can't recall now.
- Here my TR round was over, and then the HR asked me about my college life experience and my key takeaways from some of these experiences, which I explained.
- Asked me whether I'll be willing to join if I got selected even for the ninja role which I responded with a yes.
- And then asked me what will u do if u do not get selected for the role.
- He again asked me if I'd be moving onto south India for this role if they sent me.
Here my interview was completed, and the result isn't annonced yet as some of my friends' interview hasn't done yet. So I'll be updating this as soon as I get the result, whether I get selected for any role or not.😊
Interview Questions (7)
OOPs Concepts: Pillars, Use Cases, Constructors, Destructors, Copy
Discuss the four pillars of Object-Oriented Programming (OOPs). Explain real-life use cases of OOPs, why it was improvised, and how it could be defined to people without computers. Write code for constructors and destructors. Explain the difference between shallow copy and deep copy.
Pointers: 'this' keyword, Call by Value vs. Reference
Explain pointers in C++. Specifically, discuss the 'this' keyword, the difference between call by value and call by reference, and the general purpose and benefits of using pointers.
Basic Star Pattern
Write code to print a basic star pattern (e.g., a square or triangle of asterisks).
Fibonacci Series (Recursive, Iterative, Memoized)
Write code for the Fibonacci series using three different approaches: recursive, iterative, and memoization (dynamic programming).
Binary Search Tree (BST) Implementation
Write code to implement a Binary Search Tree (BST). Be prepared to dry run the code and explain its operations.
Tortoise and Hare Algorithm (Linked List)
Explain the Tortoise and Hare algorithm, also known as Floyd's Cycle-Finding Algorithm, for detecting cycles in a Linked List. Be ready to discuss its implementation and logic.
Swap Two Numbers (Pass by Value & Reference)
Write code to swap two numbers using both pass by value and pass by reference mechanisms. Explain the differences and implications of each approach.