Adobe Interview Experience | MTS-1
Summary
I successfully cleared the Adobe MTS-1 interview for the Noida location, which consisted of an online assessment followed by five comprehensive on-site rounds. The interviews covered data structures, algorithms, system design, operating systems, OOPs, and behavioral questions. I was ultimately offered the position.
Full Experience
Status and Background
I was working as an SDE-1 at Samsung Research Institute Delhi and graduated in 2018 with a B. Tech. in Computer Science from NIT Kurukshetra, India. My interview for the MTS-1 position at Adobe Systems in Noida, India took place on May 1, 2019.
1. Online Assessment Test (HackerRank)
The first stage was an online assessment on HackerRank. It comprised:
- 15 aptitude questions (15 mins)
- 5 input-output programs (15 mins)
- 2 programming questions (45 mins)
2. On-site Round 1 - Technical Round (1 Hour)
This round began with a discussion on my projects, including their architecture diagrams. Following that, I was asked several programming and theoretical questions:
- How to sort an array containing 0s and 1s in a single pass with O(n) time and O(1) space complexity.
- A problem to add 1 to a number represented as a singly linked list. Each node represented a digit, with the head pointing to the most significant digit. The challenge was to do this in a single traversal.
- I had to determine the number of different ways to form an N-bit binary number such that no two consecutive 1s occur. For N=3, examples like 101, 010, 000, 001, 100 are valid (output: 5), while 110, 111, 011 are invalid. I wrote a program, but the interviewer mentioned there's also a mathematical formula for it.
- I was asked about the Producer-Consumer problem, including writing pseudo-code. We also discussed semaphores, mutexes, critical sections, and potential deadlock scenarios involving
wait()andsignal()operations.
3. On-site Round 2 - Technical Round (1 Hour)
This round involved a deep dive into one of my projects. The interviewer skillfully transformed the project discussion into a problem and posed many follow-up questions. The core problem was:
How would you represent an image in memory, for example, as a matrix where each cell is a pixel? Considering a monochrome image represented by such a matrix, how would you programmatically draw a line segment on it? This meant filling the cells that the line segment would pass through. I had to account for both axis-aligned and non-aligned line segments and write a program for it. I initially assumed integer endpoints for the line segment and coded accordingly. The interviewer then challenged me on whether the code would work for float/double endpoints and we discussed generalizing the solution. We also covered boundary cases: what if the line segment's endpoints are outside the matrix, or if the segment is only partially inside? For a line segment not aligned to any axis and not bounded by the matrix, I was asked how to find the point where it first enters or exits the matrix.
4. On-site Round 3 - Technical Round (1 Hour)
This round covered a mix of C/C++ fundamentals, data structures, and algorithms:
- Questions on pointers, such as the validity of pointer differences and pass-by-reference in functions.
- What happens when an object of a class is declared and memory is allocated to it?
- Questions on object-oriented programming concepts like inheritance, polymorphism, and virtual functions.
- I was asked to implement a Hash Table with the following APIs:
void insert(int key, int value),void delete(int key),int search(int key), andint getRecentElement(). ThegetRecentElement()API should return the key of the element most recently touched by eitherinsert()orsearch(). All APIs were expected to operate in O(1) time, assuming no duplicate keys. - A problem to search for an element in an array where each consecutive pair of elements differs by exactly 1 (i.e., |A[i] - A[i+1]| = 1 and |A[i-1] - A[i]| = 1).
- Given N threads and single instances of N different types of resources, how would I allocate resources to threads to avoid deadlock and minimize waiting time? This assumed threads could arrive at any time and request any number of resources, without knowing their arrival schedule.
5. On-site Round 4 - Director Round (1 Hour)
This was a broader discussion round:
- We discussed my projects.
- I was asked how to identify whether software I'm about to install on my PC is malware, providing methods for both pre-installation and post-installation.
- Following up on that, I was asked how to identify if the software had deleted or added files to my file system. I suggested comparing the file system's tree structure before and after installation.
- Building on the previous question, I was given two files containing lists of file names (representing states before and after installation) and asked to write pseudocode for a
fileDifference(File A, File B)function to find the differences. - A combinatorics problem: Given an N x N matrix, how many ways are there to reach the top-right corner from the bottom-left, moving only Up, Right, and Up-Right diagonally? I used a dynamic programming approach, but the interviewer prompted me to derive a mathematical formula. (I later learned this relates to Delannoy Numbers).
6. On-site Round 5 - Manager Round (1 Hour)
The final round was with a manager, focusing on problem-solving and logic:
- I had to write a program to convert a number into English word format, specifically using the Indian Currency system (e.g., 1,23,500 to “One Lakh Twenty Three Thousand Five Hundred”, 100 to “One Hundred”).
- Another task was to write a program to check if two given binary trees are mirror images of each other.
Interview Questions (15)
Sort an array containing only 0s and 1s. The solution should operate in a single pass with O(n) time complexity and O(1) space complexity.
Given a singly linked list where each node represents a digit of a number (head is most significant digit), add 1 to this number. The operation should be done in a single traversal.
Given an integer N, find the number of N-bit binary numbers such that no two consecutive 1s occur. For N=3, valid numbers are 101, 010, 000, 001, 100, resulting in an output of 5. The interviewer hinted at a mathematical formula beyond a programmatic solution.
Discuss the Producer-Consumer problem, including pseudo-code. Explain concepts like semaphores, mutexes, and critical sections. Address potential deadlock scenarios with wait() and signal() operations.
Given a monochrome image represented as a matrix of pixels, how would you programmatically draw a line segment on it? This involves filling cells that the line segment passes through. Consider both axis-aligned and non-axis-aligned line segments. Discuss adapting the solution for float/double endpoints and handling various boundary conditions, such as line segments partially or completely outside the matrix. Specifically, how to find entry/exit points if the line is not bounded by the matrix.
Explain the process of declaring an object of a class and how memory is allocated for it.
Implement a Hash Table with insert(key, value), delete(key), search(key) APIs, all expected to be O(1). Additionally, implement getRecentElement() which returns the key of the element most recently touched by either insert() or search(). Assume no duplicate keys.
Given an array where each consecutive pair of elements differs by exactly 1 (i.e., |A[i] - A[i+1]| = 1), search for a given element efficiently.
Given N threads and N single-instance resources, design a resource allocation strategy to avoid deadlocks and minimize waiting time. Threads can request any number of resources at any time, and their arrival is unpredictable.
How would you identify if software you are about to install is malware? Provide methods for identification both before and after installation.
How can you determine if newly installed software has deleted or added files to your file system?
Given two files, File A and File B, each containing a list of file names (representing file systems before and after installation), write pseudocode for a fileDifference(File A, File B) function to find the differences.
Write a program to determine if two given binary trees are mirror images of each other.
Preparation Tips
Interview Preparation Resources
1. Algorithms and Data Structures
- GeeksforGeeks - Data Structures
- LeetCode - Classical interview problems
- Cracking The Coding Interview book - by Gayle (Explains how to solve problems step-by-step in an interview)
2. CS Fundamentals
- GeeksforGeeks - Last Minute Notes Operating Systems
- GeeksforGeeks - Last Minute Notes Computer Network
- GeeksforGeeks - Last Minute Notes DBMS