Friday, June 14, 2013

Adobe Interview of Samarth Gupta

Written:
It consisted of 3 sections viz Apti and Quant, C and Engineering.
C paper consisted of 10 questions that were based on pointers and functions.
Check if an expression has valid parenthesis

Engineering Paper:
  1. Each instruction on JVM is in byte code. How many such instructions are possible?
  2. Some Memory and Process Scheduling based scenario was given along with 4 options.
  3. Synchronization of two processes using the following code:
     boolean lock;  
     while(lock) ;  
     lock = true;  
     /* critical section code */  
     lock = false;  
    
    Is it feasible?
  4. Reverse a Singly linked list
  5. Check if a number is palindrome without converting it to string
  6. Implement multiplication recursively
  7. A number has 3 on it's unit place if one of it's multiples has 1 on all it's places. e.g. 111 is a multiple of 3, 111111 is a multiple of 13. You need to find such multiple of a given number. The multiple may be very large and exceed the limits. Don't use any complex data structures.
  8. A matrix having 0s and 1s is there. Each row can not have a 1 followed by a 0. You need to find the row having maximum 1's.

Interview 1:
It started off with compilers. Explain Parsing, different types of parsing, LR(1), LALR(1). 
Steps of compilation, explain lexical analysis, linker, loader.
Examples of syntax error, semantic error, linker error, relocatable addressing.

OS:
Process management, memory management, process v/s thread, file descriptor, synchronization techniques etc.

C/C++:
Some questions for output, overloading v/s overriding, structures v/s classes, inheritance, virtual functions, can constructors and destructors be virtual? why or why not? diamond inheritance problem, and a lots of questions on pointers. Some statements were there and I had to read them properly i.e. 
 int *p;  
 P is a pointer to integer  
Complex ones were there.
In C, functions are evaluated right to left. Why, any benefit?

Data Structures and algorithms:
Convert an expression from infix to postfix and vice versa (code)
Merge two sorted linked lists removing duplicates.
Reverse a Linked List (any other method than the one I had written in the engineering paper)
Height of a tree (he asked me more than one method. I was able to give 3 solutions)
2 sorted lists, you have to find the element of rank k in their merger without actually merging them

Assembly code to generate factorial of a number (I assumed some basic instructions like ADD, SUB, JMP etc)


Interview 2:
Design a base 64 encoder for an infinite stream of data.
Implement cin and cout using printf and scanf
Implement LRU Cache
Design a class to give following 3 functions in O(1):
  • void insert(int data)
  • void delete(int data)
  • int getRandom()

Serialization and de-serialization of a binary tree.
What are smart pointers?
How garbage collection works in java?
Malloc and Free
Maps (Hash maps) and how they work?
Average of 4 unsigned integers (simple addition might result in overflow)


Interview 3:
It was with the director of the acrobat team. Started off with my intro, what I do in leisure time, and it continued for next 20 minutes on Online Gaming. Next 20 minutes were on my project in snapdeal and next 20 mins were on what Acrobat Team does and how acrobat helps adobe earn profit.
Then he moved to DS and Algo:
Reverse a Doubly Linked List (proper code)
You are given an infinite sequence of words. what you need to do is when a new word is there, store it. whenever a word is repeated, throw an exception. Make sure you do not spend too much time in searching. Give a solution using some DS and design an algo for the same. Then this moved to phrases, then he asked me to store the sequence as well.
That's it..

Interview 4 (HR Round):
This was a casual round where we discussed about adobe, job profile, facilities etc. 

Hope it helps!
All the best.. :)

No comments:

Post a Comment