Status : 5.5 YOE
Position : SDE-2 at popular product based company
Location : India
Phone Screen :
Interviewer was from Japan. He was very kind and helpful. He clarified that he'd ask as many questions as it is possible in 1 hour.
Q1 . You are given two parameters, Data size and Packet Size.
You need to find minimum number of packets needed to send data of data size and each packet size should be as close to each other as possible.
E.g Data Size : 30 , Packet Size : 9
Ans : 30/9 -> 4 -- 30/4 7 --> 7, 7, 8, 8
I solved this one correctly without much help.
Q2. Follow up of above question with an additional condition that you can only split packets at specified positions in an array A (0<= A[i] < Data Size).
E.g Data Size : 10 Packet Size : 5 A={3}
So it means I can only split at 4th byte so ans = {4,6}
This one I felt that it was hard and I couldn't come up with any solution.
Verdict : I got rejected