I recently had an off-campus interview experience where I received a direct call from a recruiter on LinkedIn. They enquired about my internship experience, availability for a 6-month onsite role, and my interest in the opportunity. After confirming my interest, the recruiter scheduled my first round of interviews for the next day.
Interview Rounds
Round 1: Technical Interview
The first round began with the interviewer introducing himself, followed by my introduction. He explained the structure of the interview, which would include:
- Discussing my prior experience.
- Questions on system architecture and core computer science (CS) concepts.
- A problem-solving section focusing on Data Structures and Algorithms (DSA).
The interviewer was polite and helpful, creating a comfortable environment.
Discussion on Previous Work
I explained the projects I worked on during my previous internship in detail. He appreciated my explanation but challenged me with follow-up questions:
- Producer-Consumer Problem: I explained the concept but struggled to provide an ideal real-life analogy.
- Order-Placing System: He asked about system architecture and the API flow for an e-commerce order placement system. He followed up with specific REST API questions, and though I wasn’t very proficient in this area, he guided me through understanding certain API flows.
DSA Problem: Debt Minimization
The given problem was:
You are given n people and m transactions, where each transaction represents an amount of money one person owes another. The task was to minimize the number of transactions required to settle all debts so no one owes anything.
- My Approach:
- I identified it as a graph problem involving greedy in-out degree concepts.
- Proposed an O(m) solution, but the interviewer pushed me to optimize it further to O(n).
- After multiple attempts, I devised a partially correct logic and coded it within 10–15 minutes.
- The interviewer emphasized that the problem was NP-Hard and wasn’t expecting a perfect solution.
- Outcome:
- The code passed most cases except for negative weighted cycles, which I identified with his help.
- The interviewer appreciated my effort and logical approach.
Additional Questions
- ER-Model: He asked me to design an Entity-Relationship model for a student report card. I wasn’t fully prepared but managed to attempt 90% of it.
- Behavioral Questions:
- How would you cope in a fast-paced environment?
- Would you prefer your code or a scalable solution if scalability is a factor?
- I explained my code solves 90% of the problem, and for the remaining cases, we could incorporate Bellman-Ford to handle exceptions.
- The round lasted 90 minutes instead of the scheduled 60 minutes.
Round 2: Technical Interview with Director of Engineering
The recruiter informed me that I had cleared the first round and scheduled the next round for the following day. This round was conducted by the Director of Engineering (DOE).
DBMS Questions
- Indexing:
- Explained its purpose, complexities, and use cases, along with examples of real-world scenarios.
- Normalization:
- I normalized a given table to 3NF, completing about 90% of the task.
- API Optimization:
- Shared insights on optimizing API calls from my internship experience.
- API Basics:
- Discussed HTTP methods like GET and POST.
- Covered HTTP status codes such as 200, 400, 500, and 505 (I missed 400 during the discussion).
DSA Problem: Binary Tree Distance Sum
The problem involved calculating the sum of minimum distances between all pairs of nodes in a binary tree without re-routing. It was a variation of the LeetCode problem Sum of Distances in Tree.
- My Approach:
- Initially attempted a brute-force BFS to calculate pairwise distances, but it was inefficient.
- Optimized it using DFS with Dynamic Programming (DP) and Lowest Common Ancestor (LCA).
- Stored node depths in a DP array to avoid redundant calculations.
- The interviewer allowed me 15 minutes to code, and I successfully implemented a working solution that passed all test cases.
- This round lasted 65–70 minutes.
Round 3: CTO Technical Round
The final round was conducted by the CTO, who was very approachable and created a positive atmosphere.
Technical Questions
- MongoDB Aggregation:
- Solved a problem involving MongoDB aggregation queries. The CTO allowed the use of internet resources for assistance.
- DSA Complexity:
- Proved the time complexity for finding the distance between two nodes in a perfectly balanced Binary Search Tree (BST).
- Spiral Matrix Problem:
- Implemented a variation of the spiral matrix problem.
- The CTO provided a test case, and I coded and debugged the solution within 20 minutes.
Competitive Programming Discussion
We also discussed competitive programming (CP) at length, as I have experience in CP. The CTO appreciated my use of macros, templates, and efficient shortcuts during debugging, making the session more interactive.
Verdict: Selected
The next day, the recruiter informed me that I was selected for the role.
Suggestions
- Be Honest: Never exaggerate or falsify information on your resume.
- Stay Confident: Trust your approach, even if the interviewer doesn’t provide immediate feedback.
- Ask Questions: Don’t hesitate to seek clarifications for complex problems or requirements.
This structured format highlights each round, detailing key questions and takeaways while maintaining a crisp and professional tone. Let me know if further adjustments are needed!