I recently interviewed for an MTS-2 (C++) role at Adobe. The interview process consisted of 3 technical rounds, followed by the HR round.
The round started with a brief introduction, after which the interviewer quickly moved into C++ and multithreading concepts.
Follow-up:
I was able to answer the main question but struggled with one of the follow-ups.
The interviewer provided a const member function and asked how I would count the number of times the function is called, considering that the function cannot modify the object's state directly.
Design a thread-safe producer-consumer queue.
Follow-up:
What happens if none of the producer threads have started, while all the consumer threads have already entered the waiting state?
This discussion focused on condition variables, synchronization, and handling waiting threads correctly.
Explain the Rule of Five in C++ and when it is required.
Overall, I was able to answer the questions well except for one follow-up related to smart pointers.
This round focused primarily on data structures, algorithms, and implementation.
Solve the problem efficiently without using a general-purpose sorting algorithm.
Reverse a stack recursively without using any external data structure.
Find the shortest path from a given source to a destination in a grid.
shared_ptrImplement a simplified version of shared_ptr, including reference counting and appropriate memory management.
The third round focused heavily on LLD, concurrency, design patterns, and debugging.
Design and implement a thread-safe message queue.
Follow-up:
What happens when the destructor of the queue is called while multiple threads are blocked/waiting on the queue?
This required thinking about thread lifecycle, condition variables, shutdown handling, and avoiding deadlocks.
Design a simplified version of Microsoft Word supporting:
The interviewer was particularly interested in how the design could be extended to support additional formatting/features while maintaining clean separation of responsibilities.
The interviewer provided a couple of functions and asked me to identify the bugs.
One problem was related to a memory leak, while another involved a mutex/locking issue.
The interview was heavily focused on Core C++, multithreading, memory management, DSA, LLD, and debugging.
The questions were practical and went beyond just theoretical knowledge, with several follow-ups testing how well I understood the underlying concepts.
Current Status: Don't know what happens after this
shared_ptr / weak_ptr implementationconst correctness#Adobe #MTS2 #C++ #MAANG