Adobe Interview Questions
- 0of 0 votes
AnswersBob and Alice have teamed up on a game show. They won the first
- shashankesh July 23, 2020 in India
round, allowing them access to a maze with hidden gold. If Bob can
collect all the gold coins and deliver them to Alice's position, they can
split the gold. Bob can move North⇆South or East⇆West as long as he
stays in the maze and the cell is not blocked. The task is to determine
the shortest path Bob can follow to collect all gold coins and deliver
them to Alice. If it is not possible, return -1.
You will be given an n × m array where each of the values ∈ {0, 1, 2}
representing open, blocked and open with a gold coin. Alice's position is
given as (x,y) = (row, column). Bob starts at the top left in cell (0, 0).
For example, maze = [[0,2,1],[1,2,0],[1,0,0]] with Alice at (2,2) is
represented as follows:
0 2 1
1 2 0
1 0 0
minMoves has the following parameter(s):
maze[maze[0][0],...maze[n-1][m-1]]: a 2D array of integers
x: an integer denoting Alice's row coordinate
y: an integer denoting Alice's column coordinate
Constraints
1 ≤ n, m ≤ 100
0 ≤ the number of coins ≤ 10
1 ≤ x < n
1 ≤ y < m
The first line contains an integer n, the numbers of rows in maze.
The second line contains an integer m, the number of columns in
maze.
Each of the next n lines contains m space-separated integers
describing the cells of each row in maze.
The next line contains an integer x.
The next line contains an integer, y.
Sample Input 0
3
3
0 2 0
0 0 1
1 1 1
1
1
Sample Output 0
2
Explanation 0
The shortest path Bob can take is (0, 0) → (0, 1) → (1, 1).
Sample Input 1
3
3
0 1 0
1 0 1
0 2 2
1
1
Sample Output 1
-1
Explanation 1
It is not possible for Bob to reach Alice, so we return −1.
Sample Input 2
3
3
0 2 0
1 1 2
1 0 0
2
1
Sample Output 2
5
Explanation 2
The shortest path Bob can take is (0, 0) → (0, 1) → (0, 2) → (1, 2) → (2, 2) → (2, 1).| Report Duplicate | Flag | PURGE
Adobe SDE1 Algorithm - 1of 1 vote
Answersfind the maximum length subarray condition 2 * min > max
- samayragoyal990 March 16, 2020 in India| Report Duplicate | Flag | PURGE
Adobe Backend Developer Arrays Coding - 1of 1 vote
AnswersClass A has two data members which are instances of class B and class C. Class B needs an instance of class C to be created. We have to create an instance of object A on stack like 'A objA' in main function. 'new' operator should not be used anywhere.no objects on the heap
- vijay8836 December 18, 2019 in United States| Report Duplicate | Flag | PURGE
Adobe Software Engineer C++ - 0of 0 votes
AnswersDesign a data structure for json objects. Json objects consist of key:value pairs. And here the value can be int, array or another json object.
- anonymous October 05, 2019 in India| Report Duplicate | Flag | PURGE
Adobe - 0of 0 votes
AnswerDesign a hit counter which counts the number of hits received in the past 5 minutes.
- Nits April 08, 2019 in India| Report Duplicate | Flag | PURGE
Adobe Computer Scientist - 0of 0 votes
AnswersGiven k,n,m. where k is no. of coconuts you initially have. n is the some no. such that if you have >=n coconuts, you becomes stressed otherwise you become normal. m is the no. of shops.You go from 1st shop to m-th shop without skipping any shop. At i-th shop, either you buy Si coconuts or sell Si coconuts. If you are stressed then you must become normal at next shop. If you have less than Si coconuts and you want to sell then you must sell all the coconuts you have. The task is to calculate maximum possible changes of your mood from stressed to normal or vice-versa.
- mendela4cazz November 09, 2018 in India
ie: shop ={100,200,100,1,1} , k=1900 , n=2100 then answer should be 3 as initially mood is happy at first shop we buy 100 coco and total are 2000<n so still happy, at shop 2 coco 2200,now mood is stressed and so| Report Duplicate | Flag | PURGE
Adobe SDE1 - 1of 1 vote
Answerswindowing in tcp
- logan July 05, 2018 in United States| Report Duplicate | Flag | PURGE
Adobe Site Reliability Engineer Network - 1of 1 vote
Answersstateful and stateless firewall
- logan July 05, 2018 in United States| Report Duplicate | Flag | PURGE
Adobe Site Reliability Engineer Network - 0of 0 votes
AnswersThere is a list of 20 words. 10 of them are good works, and 10 of them are bad words. Write a regex of not more than 25 characters which would tell if given word is good or bad. Input would only contain one of these 20 words.
- Ashish Dass June 02, 2018 in India
Good words: papa, book, home, cars, jolly, sugar, friend, mother, father, bloomiest
Bad words: ache, slow, torn, slum, boom, rival, wrong, cholera, revenge, arrogant
Input: book
Output: Good
Input: boom
Output: bad
Write Java Code using regex pattern| Report Duplicate | Flag | PURGE
Adobe Java - 0of 0 votes
Answers1. There is a list of 20 words. 10 of them are good works, and 10 of them are bad words. Write a regex of not more than 25 characters which would tell if given word is good or bad. Input would only contain one of these 20 words.
- Ashish Dass June 02, 2018 in India
Good words: papa, book, home, cars, jolly, sugar, friend, mother, father, bloomiest
Bad words: ache, slow, torn, slum, boom, rival, wrong, cholera, revenge, arrogant
Input: book
Output: Good
Input: boom
Output: bad| Report Duplicate | Flag | PURGE
Adobe Java Developer Java - 0of 0 votes
AnswersThere are N (N > 20) team, each team will play 'M' (say M =3) league match against every other team. Design various classes, and write the code and algorithm to find the winner.
- CoolGuy May 02, 2018 in India
Note: One match can be played on a single day, as there is just one stadium.
Note: No team should play matches on consecutive days.
Note: Algorithm should come up with Quarter Final, Semi Final, and Final matches.
Follow-up Question: If N is odd or even.
How your design will be modified if there are 'S' no. of stadiums.| Report Duplicate | Flag | PURGE
Adobe SDE-3 - 0of 0 votes
AnswersWe have a quote file with millions of entries. Design a system to read from the system and return a random quote always with O(1) time. We can read the file once and can keep in memory but should not re read the same. Also when you restart your system, it should preserve and work with O(1) complexity.
- johnsvakel March 26, 2018 in India| Report Duplicate | Flag | PURGE
Adobe Data Scientist Large Scale Computing Math & Computation Object Oriented Design - 0of 0 votes
AnswersGiven a math expression in string format that contains only + & - and numbers. Return the sum in integer format. Eg: Input: "3+4-7+13" Output: 13.
- deepakSU February 19, 2018 in United States
"2+1-8+13" Output: 8| Report Duplicate | Flag | PURGE
Adobe SDE-2 - 0of 0 votes
AnswersWell design a master controller/scheduler which should be configurable and capable of running multiple processors at a same time
- saxenasaral November 30, 2017 in India
Scheduler Operation :-
scheduler process should be able to perform various operations below are the examples
1. execute sql queries and stored procedures in the database
2 should be able to send emails with given set of arguments and attachment to business
3 should be able to send ftp files based on input arguments
4 should be able to execute batch files
process should have below capabilities
Process Operation :-
1 Remotely start/stop a child process
2 Raise alerts when any above process fails
3 Automatically restart the process if it fails
4Remotely kill a child process that breaches a pre set timeout limit
so for scheduler and processor I have to come to design with
1 High level design
2 Class level diagram
3 Design should be flexible t incorporate more operations
4 any design pattern you think we can use| Report Duplicate | Flag | PURGE
Adobe Analyst - 0of 0 votes
AnswersCount number of ways to paint a fence with N posts using K colors, where no FOUR consecutive fences can have the same color.
- Basmati November 09, 2017 in United States| Report Duplicate | Flag | PURGE
Adobe abc Algorithm - 0of 0 votes
Answershere are tuples given for each users of a website (Si,Ei) where Si denotes the when the user entered the website and Ei denotes when the user exits the website .Find the maximum number of users active of website at any time duration.
- neer.1304 September 04, 2017 in United States| Report Duplicate | Flag | PURGE
Adobe MTS Algorithm - 0of 0 votes
AnswersThere is a binary stream coming . You need to print true or false based on the fact whether the number formed is divisible by 5 or not.
- neer.1304 September 04, 2017 in United States| Report Duplicate | Flag | PURGE
Adobe MTS Algorithm - -1of 3 votes
AnswerI am looking for a good resource to learn lossy counting sticky sampling.Can anyone point me towards good resource?I am ready for a one-to-one session too.
- koustav.adorable September 01, 2017 in United States| Report Duplicate | Flag | PURGE
Adobe Algorithm - 0of 0 votes
AnswersThere are some professors, some courses, and some students.
- neer.1304 August 30, 2017 in United States
Each professor can teach only a single course.
Each course has a fixed duration(Eg. 10 weeks).
For each professor, you are given time availability schedule(assume week wise).
Each student has a list of courses he wants to learn.
There can be only 1:1 classes, i.e., 1 professor can teach only a single student.
A student can attend only one course at a time.
A professor has to finish teaching a course in a one go.
Your aim is to prepare a schedule so that all courses are taught in the least time.| Report Duplicate | Flag | PURGE
Adobe Computer Scientist Algorithm - 0of 0 votes
AnswersGiven a stream of numbers which contains n numbers, each number is positioned at max k positions away from its actual position. Sort the array in the most optimized way.
- neer.1304 August 30, 2017 in United States| Report Duplicate | Flag | PURGE
Adobe Computer Scientist Algorithm - 1of 1 vote
AnswersGiven a robot which is on Origin in a number line and a string that contains either ‘L’ , ‘R’ or ‘?’. ‘L’ means turn left and ‘R’ means turn right. ‘?’ can be assumed to be ‘L’ or ‘R’. Find the maximum distance from origin the robot can go at any point of time.
- xyz March 03, 2017 in India| Report Duplicate | Flag | PURGE
Adobe Intern - 0of 0 votes
AnswersGiven a robot which is on Origin in a number line and a string that contains either ‘L’ , ‘R’ or ‘?’. ‘L’ means turn left and ‘R’ means turn right. ‘?’ can be assumed to be ‘L’ or ‘R’. Find the maximum distance from origin the robot can go at any point of time.
- xyz March 03, 2017 in India| Report Duplicate | Flag | PURGE
Adobe Intern - 0of 0 votes
AnswersGiven a list L of numbers from 0 to n, and another number k = [0-9], find how many times k appears in L. If the target number in L is more than one digit, treat each digit separately. For example, k=0 appears twice in L = [0,10].
- / January 15, 2017 in United States| Report Duplicate | Flag | PURGE
Adobe SDE-3 Algorithm - 0of 0 votes
AnswersFind out the number of ways in which two queens can be placed in a 8*8 chessboard.
- AlgoBaba November 26, 2016 in United States| Report Duplicate | Flag | PURGE
Adobe Computer Scientist Algorithm - 0of 0 votes
AnswerFind the possible (x,y) coordinates in a given 2-D chess board which are safe from the attack of a queen.
- AlgoBaba November 26, 2016 in United States| Report Duplicate | Flag | PURGE
Adobe Computer Scientist Algorithm - 0of 0 votes
AnswersYou are a string conscious guy. You categorise strings into 3 types: good, bad, mixed. If a string has 3 consecutive vowels or 5 consecutive consonants or both, it is bad. Else it is good. If a string has ‘?’, that can be replaced with any character. Thus, string ‘?aa’ can be bad if ‘?’ is vowel or good if consonant. Thus, it is mixed. Implement function which takes string s as input and returns good, bad or mixed
- novicedhunnu October 11, 2016 in India| Report Duplicate | Flag | PURGE
Adobe SDE1 Algorithm - 0of 0 votes
AnswersYou are a musician who plays different songs at different volumes. You have a particular difference that needs to be present for new song, but you don't care if it is more or less. You are given initial volume l, array of volume changes where arr[i] is volume change required after i-th song, max_vol h (min vol always 0), array size n. You need to find the max possible volume for the last song. But if at any point change is not possible, return -1. Format: n, arr[n], l, h. Ex: 3, 1 1 1, 0, 5. Ans: 3. Ex: 4, 9 1 5 4, 8, 15. Ans: -1. Ex: 3, 5 3 7, 5, 10. Ans: 10.
- novicedhunnu October 11, 2016 in India
Input explanation :
First number = size of array,
then next ‘n’ numbers of array.
Then ‘l’ means initial volume
Then ‘h’ means max volume.
Eg. 3, 1 1 1, 0, 5 means n = 3, arr = {1,1,1}, l = 0, h = 5,
Output explanation: initially you play music at vol 0, then for first arr element. Arr[0] inc. by 1,
Arr[1] inc. by 1, arr[2] inc by 1 total = 3| Report Duplicate | Flag | PURGE
Adobe SDE1 Algorithm - 2of 2 votes
AnswersGiven infinite supply of coins of denominations 25, 10, 5 and 1, find the distinct number of ways to use the coins to sum up to the given value
- rajansthapit October 10, 2016 in United States| Report Duplicate | Flag | PURGE
Adobe Software Engineer Algorithm