Panda Guru LogoPanda
Guru

Tata 1mg | SDE 1 | Gurgaon | July 2024 [Offer + Accepted]

Round 1: Data Structures and Algorithms (DSA)

Questions:

  1. Next Greater Element:

    • A new problem for me at the time, so I took about 20-25 minutes to solve it using a stack. My solution passed 3 out of 4 test cases during the discussion.
  2. Find Smallest and Second Smallest Element in an Array:

    • Initially, I described brute force solutions (sorting or two traversals).
    • Later, I optimized it using two variables in a single iteration, which worked for all test cases.
Candidate's Approach

I approached the "Next Greater Element" problem by using a stack to keep track of the elements and their indices. For the second question, I initially considered sorting the array but then realized I could achieve the result in a single pass using two variables to track the smallest and second smallest elements.

Interviewer's Feedback

I received a rejection email shortly after. However, a few days later, HR called back to explain that while my performance in Round 1 was good, they didn’t have an opening in Gurgaon at the time.


Round 2: DSA

Question:

  1. Reverse Nodes in K-Group:
    • The interviewer asked me to first create a linked list from scratch and then solve the problem.
    • I leveraged recursion to solve the problem in about 20-25 minutes.
    • All test cases passed, and the round concluded within 30 minutes.
Candidate's Approach

I created a linked list from scratch and used recursion to reverse the nodes in groups of K. This approach allowed me to efficiently handle the problem within the time constraints.

Interviewer's Feedback

HR called within an hour to inform me that I had cleared the round.


Round 3: Tech Stack Discussion

Questions:

  1. Discussed my projects, tech stacks used, and day-to-day work during internships.
  2. Differences between SQL and NoSQL databases and their use cases.
  3. A database design question for a specific scenario.
  4. Questions on nginx and alternatives.
  5. Cross-questioning on my answers to ensure in-depth understanding.
  6. Built an API from scratch, including setting up the environment, database, and handling basic flows.
Candidate's Approach

I provided detailed explanations of my projects and the technologies I used. I also discussed the differences between SQL and NoSQL databases, and I was able to design a database for the given scenario effectively.

Interviewer's Feedback

I received confirmation from HR that I had cleared this round and was selected for the role.


Round 4: Tech Stack (Final Round)

Questions:

  1. Basic introduction, followed by a review of my past interview feedback.
  2. Rate Limiting on APIs without using a database:
    • I proposed using caching and IP-based rate limiting, combined with an interface like NGINX to manage counts.
    • We refined the solution together during the discussion.
  3. Wrote pseudo-code for the rate-limiting implementation.
  4. Explored basic OOP concepts.
Candidate's Approach

I suggested a solution for rate limiting that involved caching and IP-based tracking. I also wrote pseudo-code to illustrate my implementation approach and discussed basic OOP concepts as requested.

Interviewer's Feedback

Despite feeling unsure about my performance, the interviewer provided positive feedback.


Final Outcome

HR called back with an offer letter for the Gurgaon team.