Adobe | C++ developer
- Posted
- 17 Jun 2021
Summary
I underwent two interview rounds for a C++ developer role at Adobe, which involved LeetCode problems like Jump Game IV and Open the Lock, alongside specific C++ concepts such as class compilation and constructor types.
How it went
I recently interviewed for a C++ developer position at Adobe, which consisted of two distinct rounds.
In the first round, I was presented with a problem from LeetCode, specifically Jump Game IV. I attempted to solve this problem but was not able to fully complete it during the interview. Following that, I was given a small C++ question involving class instantiation and asked to identify if it would compile successfully. The code snippet was:
Class A{
}
int main(){
A obj;
A *obj=new A();
}
The second round featured another LeetCode problem, Open the Lock. Additionally, I was questioned about various C++ constructor types and tasked with implementing them for a custom String class.
Questions asked (4)
- 01
Jump Game IV
Data Structures & Algorithms · Hard
Open the problemYou are given an array of integers
arr, and you are initially at index0. You want to reach the last index of the array. You can jump from indexito indexjif:i + 1 = ji - 1 = jarr[i] == arr[j]
- 02
C++ Class Compilation Error
Other
Given the following C++ code, determine if it compiles successfully and explain any errors:
Class A{ } int main(){ A obj; A *obj=new A(); } - 03
Open the Lock
Data Structures & Algorithms · Medium
Open the problemYou have a lock with 4 wheels, each wheel has 10 slots '0' - '9'. Each slot can be turned forward or backward. You are given a list of
deadendswhich are combinations that will cause the lock to be permanently locked. You are also given atargetcombination. Starting from '0000', return the minimum number of turns to reach thetargetcombination, or -1 if it's impossible. - 04
C++ Constructor Types and String Class Implementation
Other
Explain different types of C++ constructors (e.g., default, parameterized, copy, move) and provide an implementation for a custom
Stringclass that correctly handles these constructors.
How they prepared
Based on my interview experience, future preparation should heavily focus on LeetCode problems, particularly those of medium to hard difficulty. A strong emphasis on graph traversal algorithms like Depth-First Search (DFS) and Breadth-First Search (BFS) is highly recommended, as these topics frequently appeared in the questions I faced.