Role: SDE2 Backend
College: Not Specified
Interview Date: 2018-02-20
Interview Type: Full-Time
Result: Selected
Difficulty: Not Specified
Rounds: 5 rounds
Topics Asked: Data Structures, Algorithms, Java (ConcurrentHashMap, enums, collections, generics, multithreading), Spring (Bean scopes, microservices, circuit breakers, message queues), System Design, Puzzles, Behavioral.
Experience:
The candidate had around 3 years and 4 months of experience and interviewed for an SDE2 backend Java profile. The interview process spanned over a week.
Round 1: Data Structures and Algorithms
This round had two interviewers and started with an introduction and discussion about the candidate's work and GitHub/competitive programming profiles. Three questions were asked focusing on time complexity, space complexity, and code clarity.
- Question 1: Given a binary search tree in which data of 2 nodes is swapped, print the swapped nodes. The candidate proposed an O(n) solution using in-order traversal to identify out-of-order nodes.
- Question 2: Given a binary tree with a modified structure (each node contains information about the parent node), if a node is burnt, and the fire travels to parent and children nodes in 1 second, tell the time in which the entire tree will be burnt. The candidate used BFS for an O(n+e) solution.
- Question 3: Print the bottom view of a binary tree (simple, O(n)).
Round 2: Java
The interviewer focused on Java-related concepts.
- Question 1: How ConcurrentHashMap works, its underlying algorithm, how synchronization is achieved, and explain the bucket protocol.
- Question 2: Use of enum and an example of a design pattern that uses it.
- Question 3: Different questions related to collections and generics.
- Question 4: Threads, Latches, barriers, Semaphores, Mutex, Deadlocks, Callables, and other multithreading concepts.
Round 3: VP Technical Round
This round was with a very experienced person (10+ years) who was also an ML Head.
- Question 1: Bean scopes in Spring, how scope resolution works, and problems arising from passing a request-scope bean in a singleton-scope bean.
- Question 2: Microservice architecture vs. monolith, benefits, and explanation of microservices used in the candidate's code and interaction mechanisms.
- Question 3: Circuit breaker (e.g., Netflix Hystrix) and service discovery.
- Question 4: Explanation of architecture implemented for real-time synchronization (WebSocket and Stomp protocol in Spring) and message queues used.
- Question 5: A puzzle: Given a square board with a 1 rupee coin on each corner (unknown orientation), two players A and B (B is blindfolded). Player B wins if all coins are either head or tail. Player A tells B when to stop. The interviewer wanted to check the approach to solve this, given B is the candidate and A is the interviewer.
Round 4: CTO Round
The CTO had over 15 years of experience and was an expert in machine learning, distributed systems, and AI.
- Question 1: Projects and HLD of projects, most complicated problem solved.
- Question 2: Favorite app, one feature to change, and how to implement it.
- Question 3: Design a search engine similar to Google, focusing on scalability and performance.
- Question 4: Implement an algorithm to show nearby restaurants, petrol pumps, etc., on a travel route, optimizing it.
- Question 5: Geometrical puzzle to check calculation speed and edge cases.
Round 5: CEO Round
This was a conversational round with the CEO.
- Question 1: Introduction and basic questions about experience and qualifications.
- Question 2: Design a system similar to Uber.
The overall experience was wonderful, and the candidate was offered the SDE2 (Senior Software Developer) profile.