Wednesday, April 29, 2009

Decho Interview of Sandeep Jain

Hi,

This is my Interview Experience at Decho, Hope its helpful... :)


Round 1: One hour Aptitude test

It contained the usual apti questions like
- pipe
- ratio proportion
- seating/arrangements
- % related
- speed distance

It seems easy with the captions but there were few really tricky ones.

These two were different:

There is only one correct soultion to the following, what is it?
A) Ans is A
B) Ans is A or B
C) Ans is C or D
D) None of this

How many questions have you solved correctly?
A) All of them
B) None of them
C) All of them except this one
D) Only this one




Round 2: 30 Minutes Technical written

5 questions we had to do any 3

1) Reverse a Link List
void reverse(node **head)

2) Count the number of leaves in a binary tree.
This question was not that clear it seemed as if they wanted to know minimum & maximum number of leaves in a Binary tree with N nodes.

3) Write a function to Reverse the words in a sentence.
void reverse_words(char *sentence, int sentence_length);

For e.g.
Input: This is a book
Output: book a is This


4) Given a Binary tree, write a modify function that replaces a nodes value with the sum of the values of its children.
void modify(node *root);

5) There is a string, and a pair, count the occurrences of this pair in this pair.
E.g.: String = "abceabcdefqw", Pair = "ab"
int count_pairs(const string &str, const string &pair);




Round 3: First tech interview

Q) Tell me something about yourself
Q) About the project in Trilogy, He only wanted a basic introduction of the project
Q) I have to maintain an integer which can be in two states, i = a or i = b.
i.e. i can have only these two values. Write a code that toggles this value of i from a to b or vice versa. Without using if, switch, for, while, do-while, ternary.
I gave a XOR solution, but then he said do not use any XOR either.

Q) Write a function to find the first non-repeating character in a given char array.

Q) There are three ants sitting at the vertices of an equilateral triangle. They can only move along the edges of the triangle. If all of them have equal speed and all of them start moving at the same time. What is the probability of collision of any two ants?

Q) I have a group of people standing in a matrix form (i.e. rows & columns) I select a person A who is the tallest of the shortest of every column,
person B who is the shortest of the tallest of every row.
Out of A & B who has the chances of being taller than the other.

Q) What are const functions?
Q) How do you make a member variable modifiable even if the object itself is const?
Q) What are the ways in which you pass arguments to a function? (call-by-value, call-by-reference) Give examples and explain the working.
Q) I gave an e.g of using int type arguments. So now he asked What if are dealing with objects?
Q) When are copy constructors called? write a sample copy constructor.
Q) What is a singleton class? Write a sample.
Q) Why do we use virtual destructors?
Q) Suppose you created a class, can you prevent your users from using destructors?
Q) What happens when you use a static variable in a function? What if we have multiple threads facing race condition for that static variable?
Q) Where is the data that is used by a process stored? (he wanted details of storage in terms of local variables, global, static, dynamically allocated ones)
Q) Write a fully functional Queue class.




Round 4: Second tech interview

Q) Started with the Trilogy-project. Asked for a detailed description. What the project is, how it works, what have I done till now?
What kind of bugs I fixed? What was the biggest challenge during internship? etc etc... I spoke everything I could recall at that time.
Q) Write a function that will convert a binary tree into its mirror image.
Q) There is an underground electric wire from city A to city B, The wire has broken at some point. The only way to check the wire at any point is to dig that place and then check whether it is broken or not. Give an efficient way to do it, so that our time & cost is minimal.
I gave a solution(think a little, its easy) then he said, what if do not know the distance, we only know that wire starts from city A, and that it is broken at some point.
Q) Prisoners on a staircase with either red/blue hats. The one who tells the correct colour lives or he dies. Its a famous puzzle.
Q) Pirates puzzle, 5 Pirates, have 100 bucks. They follow a hierarchy all 5 being at different levels. The superior one decides how to distribute the money. Then there is a poll among the five, if there are more than 50% votes against the distribution the top most pirate is killed. Then the distribution has to be made by the 2nd pirate in the hierarchy and so on. Assuming that all pirates are really smart, greedy, and want to live as well. How would the leader distribute it.
Q) In a village there are 100 people & everone has a strange disease, all those who have this disease have a halo over their head. If anyone comes to know that he has the disease(by looking at his halo or if someone else tells him) he dies the next morning. i.e. Awareness of disease leads to death. :P
A magician, in an attempt to save them, cast a spell over the entire village. Because of which "NO one shall see his own halo, and no one shall tell anyone else about their Halo" NOW the questio is, For many days will they live?



Round 5: Third tech interview

Q) Write a recursive function to compute the number of binary 1's & 0's both.
Q) Write a function that removes extraneous spaces from a string. For e.g.
Input: "I______am_____a______Boy"
Output: "I am a Boy"
Input: "______I_____am_____a____________Boy____"
Output: "I am a Boy"

I gave them the code, but they insisted my code to have a fatal bug. & I kept disagreeing, finally they said, its correct telling me that they forgot to see the last line of code (which handled null)

Q) Why do we need multi-threading on a single processor? (He wanted the concept of DMA & I/O devices)
Q) There are 6 boxes numbered 1,2,3,4,5,6. Box 1 contains infinite balls of 1 kg. Box 2 contains balls of 2 kg and so...
However one of the boxes contains defective balls. All balls have the same defect and thus there weight is different than the expected weight. For e.g. in Box 3 we have all balls weighing 8 kg instead of 3 kg.
Given an electronic scale so that measure accurate weights of each, In how many least weighings can you find out the defective box, how many balls will you will take out from the boxes?



Round 6: The F-2-F with the General manager of Decho

Initially she did not ask any questions she just explained how the company works, what the project is, how the current project works etc etc. Then she asked me what I did or didn't understand. If I would like to ask any questions to her. This all seemed pretty good. Cause she made it appear as if I was selected. She also explained how Decho is a part of EMC^2 (It was acquired by EMC^2)
Then she told me that the HR will meet me next.



Round 7: HR round

- Tell me something about yourself starting from your school, Please skip the technical details.
- What about your family, fathers business, siblings etc etc.
- How did you get into this IT field, you already have a family business?
- Who are the people you met today? (I told her that in sequence :P)
- From the time you came to our office till now, what new have you learned?
- What was the best experience in Trilogy?
- What was the worst experience in Trilogy?
- Why not Aricent? Why not Nagarro?
- Why Bangalore & not NCR?
- She asked some resume related stuff, as well.
- What your strength? Weaknesses?
- (I answered being short tempered as a weakness) then why do you think you get angry?
- Why do you think people get angry?
- Next she wanted me to ask her questions, as much as I wanted to?

I asked her the following:
-- What do you think I should or must improve on?
-- What are the office timings? I hope its not a school.
-- I asked her about EMC^2 & how does EMC^2 effect Decho. What about recession's effect on EMC and thus on Decho?
-- How does the appraisals work? (Cause she said its the task of manager to check on the performance)
-- If the compnay provides cab facility or accomodation?

There were sone questions related to compensation as well, which I am not listing here... :P :P

And thats it...
Through with it... :)

All The Best to all of you.

No comments:

Post a Comment