Adobe Interview Questions

Its been a long time made any posts on this blog. Let me try to share a bunch of my interview experiences. Starting with the letter A 😉 – Adobe

I had an interview with Adobe in early 2009 in their Bangalore Office, when Trilogy was shutting down its Office. I had about 8 months work experience by then

It started with a written test for 2 hours. There were about 7 or 8 (out of 80+) folks short listed for further rounds.

First Round:
1. There was a discussion around Makefiles

2. I heard a new term in this question – Distributed compilations. The questions was – how would you design such a system. A basic introduction was given about the system.

3. Assume there is a “container” the container have some “components” and each component in turn contains “items”, the components have some “properties”, also the items have some properties and some components depend on the properties of some other components by which I mean if the property of one component changes then the components behaviour which is dependent on this should alter. What data structure would you use in order to maintain this information.

4. Given 2 linked lists how to find the intersection. Imagine a Y shaped linked list.

Second Round:
1. You know malloc and free() functions. malloc knows the number of bytes to allocate, where as free() just takes a pointer and frees the same amount of memory that has been allocated to this address. if I ask you to implement this malloc() and free(), what would be underlying Data Structure that you would use in order to maintain the information required. It was a good discussion on complexity various approaches etc.
2. Given a string find first non-repeating character.

3. And some good ones which I don’t remember

Third Round
1. Reverse a linked list recursively without using global variables

2. Finding anagrams of a given word from a dictionary

3. Forgot the rest 😦

Fourth Round:
1. Discussion about Yahoo! project,work in Trilogy, technologies known.

2. How to implement a generic stack in Java

Find nodes in a binary tree which are at a distance K from a given node

You are given a binary tree and a node in the tree, your task is to find all the nodes in the binary tree which are at a distance K from that node. These nodes can be downwards [descendants of the node] or upwards.

For example: In this image

The nodes that are at a distance 2 from 7 are 5 (6’s left child), 11, 5 (2’s right child).

This is a coding question.

Function prototype:

void PrintKDistanceNode(Node *root, Node *node, int K)



Interview Question : Print nodes of a Binary Tree level order from leaves to root

I think most of you might know about Breadth First Search (BFS), in which you print nodes of a tree from root to leaves. Now there is a small change to the way the nodes are printed. Lets say given a binary tree, I want the nodes to be printed level order but from leaves to root

Eg :  consider the binary tree at this locations

Now you need to print : 5 11 4 2 6 9 7 5 2