Adobe | Bangalore | Jan 2020 [Offer]
Anonymous User
7610

Round 1 :

  1. [https://leetcode.com/problems/best-time-to-buy-and-sell-stock/]
  2. You have and array with 1 million elements, have to find out the sum of all elements in best possible time. (Parllel processing using threadpool, create some 4 or 5 threads and divide the array in to equal halfs and process the sum). Here interview stressed on multithreading and mutex locking and unlocking, RAII Pattern in C++, future, promise objects supported from C++ 11.
  3. Asked about virtual memory and i have told basics of it, didnt go deep in to virtual memory concept.

Round 2:

  1. Given flipImageHorizontally(char* image, int width, int height){}, asked to flip the image horizontally. Given him the algorithmic solution. [He stressed on optimization, adobe wants you to use memcopy/memmove instead of you individually swap the elements. memcopy/memmove does block level memory copying which gives best optimization results, I seriouslly dont know about this so learnt from him).
  2. Extension question what if i had 10000 x 10000 image and i have to flip this image now. I have used the same logic, but used multithreading.
  3. vertical swaping(column wise swapping) of elements is better or horizontal swaping of elements is better ? (told him horizontal will give better performance, when asked why? i told him just now you mentioned memcpy does block level copy and give good performance, so with row wise swap i can acheive block level copying, he is impressed, i can feel it).
  4. Write code for shared pointer class.
  5. Design drag and drop system. If you will list of shapes, drag the shape and drop it, you should draw that shape. (Using MVC architecture, Factory of shapes, Bridge pattern, designed this)

Round 3:

  1. About project, multithreading level discussion.
  2. [https://leetcode.com/problems/print-zero-even-odd/] similar kind of solution, you are given a big string and 4 threads are running, each thread should print one word.
    I am a lover of leetcode
    I - thread1
    am - thread2
    a - thread3
    lover - thread4
    of - thread1
    leecode = thread2
  3. Difference between lock_gaurd and unique_lock(you can unlock with unique_lock, when you are done working on shared resource, same thing you can acheive with lock_gaurd when you scope the shared resource)
  4. Design Elevator system. (Pitfall - From here i lost my focus, will explain below, how should it be designed)
  5. Given a 100GB file in server 1 and same file in server 2, both of the files are same and they differ by 1 character and he asked me to find that character.
    I gave simple exor solution and i can see he is pissed off.
    Then he modified the question saying, identify the position of the differed character. I told him to do binary search. he was okay with this solution. Best case O(logN). Worst case O(N).

Round 4: Director Round
Behavioural Questions (becareful he judges based on your answer and decides your level)
He asked to me design an algorithm which will generate unique SUDUKO puzzles for next 100 days.[this is something i liked alot, finally got a good question at the end of the day]

I have designed my datastructure as
unordered_map<int, vector> map;

I have told based on difficulty level of puzzle number of elements will be inserted in to the puzzle.
HARD - 36 elements (9 x 4(difficultylevel))
MEDIUM - 45 elements (9 x 5(difficultylevel))
EASY - 54 elements. (9 x 6(difficultylevel))

for(int difficulty = 1; difficulty <= difficultylevel; difficulty++){ //this is will run 4 times if generating for HARD level
    for(int i = 1; i <= 9; i++){
	      now this number i, ill try to find the position for this number randomly.
		   while(true){
			   int pos = random() % 81;
			   int row = pos / 9;
			   int col = pos % 9;
			   int grid = (some logic to find subgrid)
			   and these values ill try to check in the map
			   if the i number is not there in that row, col, or grid ill insert number "i" in the puzzle.
			   and put them in map as well and break infinite while loop.
			   map[i].push_back({row, col, grid});
		   }
	}
}

Keep yourself hydrated and carry a water bottle with you as adobe guys are very poor at checking the discussion timing. This can go for 2 hours as well and tell cordinating HR to give 15min break if required) in round 3 has pushed director to take this decision.

Let me tell you

What Adobe Looks !!!

  1. Multithreading, Threadpool, Synchronization, Promise, Future, Mutex, Parrell processing
  2. MVC architecture
  3. Design Patterns.
  4. Loosely coupled designs. Use the word loose coupling you will be selected. In your design never design the system tightly. Let two components interact like how componenets interact in producer, consumer problem. Use multithreading as heavy you can, but be confident on these concepts.
  5. Use callbacks in the design

Sample design questions which i was asked earlier at Adobe.

  1. Design Timer (create a thread and put that thread to sleep(so that it doesnt consume CPU) till the mentioned time and once you reach that time, thread is awaked by OS and you can call the callback passed when timer thread is created.
  2. Design Logger (used chain of responsibility patter and logging was done in a seperate thread, where all the logging data is sent to queue, logging thread consumes this logging data and logs the data. Typical producer consumer problem)
  3. Most of them will be like typical producer consumer problem, or event loops or thread pool thats it.

Currently Adobe is hiring in bangalore and they are conducting hiring drives every saturday.
Intrested guys drop a mail to arun@assurehrlabs.com

Previous Experience At Adobe : https://leetcode.com/discuss/interview-experience/455354/give-away-mistakes-i-did-in-interview-and-which-should-be-avoided/410607

Good Luck !!!

Comments (6)