It consisted of a single coding question to be solved under 3 hrs. There were two slots –
First slot recieved this question-
There are N fishing spots and 3 gates. At each gate there are some fishermen waiting to reach the nearest unoccupied fishing spot. (Total no of fisherman <=N)
Distance between consecutive spots = distance between gate and nearest spot = 1 m
Only 1 gate can be opened at a time and all fishermen of that gate must occupy the spots before the next gate is opened.
Distance is calculated as gate to nearest spot + nearest spot to closest vacant spot.
Find the total sum of minimum distances need to walk for all the fishermen.
Inputs to be taken:
Number of fishing spots
Position of the gates
Number of fishermen at each gates
Second slot recieved this –
This round consisted of technical interview. The interviewer asked questions on my resume and trees.
Binary search Tree, Balanced BST, Binary search was the major part.
Why do we prefer bst over linear search?
Time complexity of Binary search and BST.
What is static, volatile and extern in C ?
He asked me about my favourite subjects and my what do i like in electronics although I applied for software profile.
He asked me about my interests.
At last he asked me if I have any questions.
The interviewer was very polite and shaked hand after ending the interview.
Advice- Be truthful to your interviewer, if you don’t know something that they ask then just tell them. It’s more about knowing how you think rather than how much you know.