Adobe interview experience Real time questions & tips from candidates to crack your interview

MTS 1

Adobe
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structure & algorithms, Java Low Level Design, Operating System, DBMS
Tip
Tip

Tip 1 : Solve medium level of LeetCode and GFG
Tip 2 : Good understanding of your project
Tip 3 : Mention only that thing in resume in which you are confident

Application process
Where: Linkedin
Eligibility: No
Resume Tip
Resume tip

Tip 1 : Mention good projects and highlights your skill
Tip 2 : Mention your codeforce/codechef rating

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date10 Aug 2022
Coding problem2

1. Subarray With Given Sum

Moderate
15m average time
85% success
0/80
Asked in companies
Thought WorksAdobeInfo Edge India (Naukri.com)

Given an array ARR of N integers and an integer S. The task is to find whether there exists a subarray(positive length) of the given array such that the sum of elements of the subarray equals to S or not. If any subarray is found, return the start and end index (0 based index) of the subarray. Otherwise, consider both the START and END indexes as -1.

Note:

If two or more such subarrays exist, return any subarray.

For Example: If the given array is [1,2,3,4] and the value of S is equal to 7. Then there are two possible subarrays having sums equal to S are [1,2,3] and [3,4].

Problem approach

Traverse the array from start to end.
From every index start another loop from i to the end of the array to get all subarrays starting from i, and keep a variable currentSum to calculate the sum of every subarray.
For every index in inner loop update currentSum = currentSum + arr[j]
If the currentSum is equal to the given sum then print the subarray.

Try solving now

2. Top View Of Binary Tree

Moderate
25m average time
70% success
0/80
Asked in companies
MicrosoftMakeMyTripOYO

You are given a Binary Tree of 'n' nodes.


The Top view of the binary tree is the set of nodes visible when we see the tree from the top.


Find the top view of the given binary tree, from left to right.


Example :
Input: Let the binary tree be:

Example

Output: [10, 4, 2, 1, 3, 6]

Explanation: Consider the vertical lines in the figure. The top view contains the topmost node from each vertical line.
Problem approach

This approach is based on the level order traversal. We’ll keep a record of the current max so far left, right horizontal distances from the root.
And if we found less distance (or greater in magnitude) then max left so far distance then update it and also push data on this node to a stack (stack is used because in level order traversal the left nodes will appear in reverse order), or if we found greater distance then max right so far distance then update it and also push data on this node to a vector.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date18 Aug 2022
Coding problem2

1. First and Last Position of an Element In Sorted Array

Easy
15m average time
85% success
0/40
Asked in companies
AmazonMicrosoftAdobe

You have been given a sorted array/list 'arr' consisting of ‘n’ elements. You are also given an integer ‘k’.


Now, your task is to find the first and last occurrence of ‘k’ in 'arr'.


Note :
1. If ‘k’ is not present in the array, then the first and the last occurrence will be -1. 
2. 'arr' may contain duplicate elements.


Example:
Input: 'arr' = [0,1,1,5] , 'k' = 1

Output: 1 2

Explanation:
If 'arr' = [0, 1, 1, 5] and 'k' = 1, then the first and last occurrence of 1 will be 1(0 - indexed) and 2.


Try solving now

2. Median of two sorted arrays

Hard
25m average time
65% success
0/120
Asked in companies
GrabMicrosoftWells Fargo

Given two sorted arrays 'a' and 'b' of size 'n' and 'm' respectively.


Find the median of the two sorted arrays.


Median is defined as the middle value of a sorted list of numbers. In case the length of list is even, median is the average of the two middle elements.


The expected time complexity is O(min(logn, logm)), where 'n' and 'm' are the sizes of arrays 'a' and 'b', respectively, and the expected space complexity is O(1).


Example:
Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]

Output: 3.5

Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
Problem approach

The given arrays are sorted, so merge the sorted arrays in an efficient way and keep the count of elements inserted in the output array or printed form. So when the elements in the output array are half the original size of the given array print the element as a median element. There are two cases: 

Case 1: m+n is odd, the median is at (m+n)/2 th index in the array obtained after merging both the arrays.
Case 2: m+n is even, the median will be the average of elements at index ((m+n)/2 – 1) and (m+n)/2 in the array obtained after merging both the arrays

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date21 Aug 2022
Coding problem2

1. Matrix Chain Multiplication

Easy
0/40
Asked in companies
AdobeGrabSpringworks

You are given ‘N’ 2-D matrices and an array/list “ARR” of length ‘N + 1’ where the first ‘N’ integers denote the number of rows in the Matrices and the last element denotes the number of columns of the last matrix. For each matrix, the number of columns is equal to the number of rows of the next matrix. You are supposed to find the minimum number of multiplication operations that need to be performed to multiply all the given matrices.

Note :
You don’t have to multiply the matrices, you only have to find the minimum number of multiplication operations.
For Example :
ARR = {2, 4, 3, 2}

Here, we have three matrices with dimensions {2X4, 4X3, 3X2} which can be multiplied in the following ways:
a. If the order of multiplication is (2X4, 4X3)(3X2), then the total number of multiplication operations that need to be performed are: (2*4*3) + (2*3*2) = 36

b. If the order of multiplication is (2X4)(4X3, 3X2), then the total number of multiplication operations that need to be performed are  (2*4*2) + (4*3*2) = 40
Problem approach

Create a recursive function that takes i and j as parameters that determines the range of a group.
Iterate from k = i to j to partition the given range into two groups.
Call the recursive function for these groups.
Return the minimum value among all the partitions as the required minimum number of multiplications to multiply all the matrices of this group.
The minimum value returned for the range 0 to N-1 is the required answer.

Try solving now

2. Symmetric Tree

Easy
20m average time
82% success
0/40
Asked in companies
IBMAdobeOracle

You are given a binary tree, where the data present in each node is an integer. You have to find whether the given tree is symmetric or not.

Symmetric tree is a binary tree, whose mirror image is exactly the same as the original tree.

For Example:

sym_tree

Problem approach

The idea is to write a recursive function isMirror() that takes two trees as an argument and returns true if trees are the mirror and false if trees are not mirrored. The isMirror() function recursively checks two roots and subtrees under the root.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
MTS 1
6 rounds | 10 problems
Interviewed by Adobe
4050 views
1 comments
0 upvotes
company logo
MTS 1
2 rounds | 5 problems
Interviewed by Adobe
1550 views
1 comments
0 upvotes
company logo
MTS 1
3 rounds | 9 problems
Interviewed by Adobe
0 views
0 comments
0 upvotes
company logo
MTS 1
2 rounds | 6 problems
Interviewed by Adobe
557 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
MTS 1
4 rounds | 14 problems
Interviewed by Oracle
4096 views
0 comments
0 upvotes