Package: 19 LPA
Profile: Software Engineer
My intro and she asked me about my project.
Question 1: Diagonal sum in a Binary Tree:
I used queue to do that.
Puzzle: Suppose there is nx4 wall and I have to fill it with 1x4 sheet so I have to find out in how many ways it is possible?
2 _ 5 1 2 3
State: 1 4 6 final state: 4 5 6
7 8 3 7 8 _
I told him that I can solve it using naive approach, so he asked me to explain it and code it (algo)
Then he want me to optimize it. So he told me that suppose you have 10 state and you have to choose one state which give minimum number of moves, asked me how you will choose.
In the end he told me the approach which is the modification of Dijkstra's algorithm called A* search Algorithm and he also told me that it is not fair for him to ask approximate algorithm in an interview, He just want to know how I approach toward solution.
Question 1: My Intro and Achievements
Question 2: Given an integer Sorted Array of 1000 elements and an element.
I have to tell him number of comparison required to do that (not formula) a Number.
Answer: At most 10 (log2 N)
He askd me how would you rate yourself in cpp?
Question 3: Difference between java and cpp.
Question 4: Virtual Functions and how it work.
Question 5: why is necessary to have Virtual Destructor?
Question 6: 2nd Normal Form and when normalization and demoralization required
Then he asked me about transactions and acid property.
Question 7: Suppose I have to go to 10 customer to deliver their order, so how will you deliver their order and come back in minimum amount of time. What data structure is required to do that and how i will model it with data structure?
Question 8: map in stl?
I told him I don’t know about stl. So he told me to implement the map.
Asked me that suppose some names and their comment is given so I have to define a function in which he pass only name and it will return their comment and only one comment is allow for one person
NO HR Round J