Note: Questions are slightly modified due to NDA.
1. Coding Round
- Reverse nodes in k-group: The interviewer added an extra twist to reverse nodes in alternating sets of size
x and y. For example, reverse x nodes, then reverse y nodes, and so on.
- Auto-complete based on frequency: Given product names and their frequencies, return the top 3 product names that match a given prefix, sorted by frequency. For a similar problem, check out longest common suffix queries.
2. Concurrency Round
Adobe has a dedicated round on multi-threading. I was asked to create a task scheduler that supports:
- Single execution: Tasks are executed once at a given start time (or as soon as a thread is available).
- Periodic execution: Tasks are executed repeatedly after a given delay, for a specified number of iterations.
I initially proposed a min-heap solution where the tasks were polled continuously by worker threads. However, the interviewer asked me to implement a solution using wait(), notify(), and notifyAll(). We also discussed volatile and synchronized keywords in Java.
3. System Design
The task was to design a webinar platform with three types of licenses: Silver, Gold, and Platinum. The license would determine:
- The maximum number of participants allowed per webinar.
- The overall participant limit for all ongoing webinars of a user.
For example, a Gold license allows 100 participants per webinar and a total of 300 participants across all webinars. Additionally, the platform had a global limit of 60K active users.
3. Hiring Manager Round
This round was more technical than I expected. The manager gave me a real problem they were facing:
- Their legacy monolithic system was built for a maximum of 100K users, but now they needed to scale to 1 million users. The challenge was that the monolith couldn’t be modified.
- I proposed deploying 10 instances of the monolith, each handling 100K users, with an intermediate microservice to direct users to the correct instance using consistent hashing based on the user’s email. The user ID from the monolith would then be combined with the instance number to ensure uniqueness.
Preparation
For my preparation details, check out my Google interview experience blog.