Saturday, March 20, 2010

Interview Questions: Flipkart

Flipkart Interview Questions

1) Linked List reversal , without using any extra memory. (Code Insertion)

2) M 0's N 1's M>N. No. of possible permutations of String of length M+N.

3) Count no of characters/words/lines in a file. Given file handle definition.

4) Merge two trees into a new tree.
Example: (1,(2,null))and (1,(null,3)) results in (1,(2,3))
(1,(2,null))and (1,(3,null)) results in null (Not a valid operation)

5) Consider linked list {1,2,3,4,5,6}
return {2,1,4,3,6,5}. Write a function that does this without using any extra memory.

6) func(){
fork();
fork();
fork();
print("Saikacollection\n");
}
Output = ?

7) Suppose process process p1 creates a child process p2. If p1 gets killed then what happens to p2?

8) Output?
sum = 0;
for(int i = 0;i<12;i++){ j =" i+1;j<10;j++){" k =" j+1;k">8;k++){
sum++;
}
}
}
printf("%d",sum);

9) Monty Hall Problem Card variant.


10) Simple probability question. 6 Organges and 4 Apples. prob of Picking two oranges?


Thanks to chirag for this post.