I applied through a staffing agency. The process took 2 days. I interviewed at Leap in Sep 2022
Interview
HR scheduled a first round of DS and Algo round.
The first round was taken by Interview Vector [3rd party]. The interviewer asked some questions about core java, databases, Spring, etc for first 15 mins and then in the next 40 mins there was a coding problem.
Interview questions [1]
Question 1
Given a data set with details pertaining to amount that one person owes to the other in the form of csv .
Sample Input
Friend 1 Friend 2 Amount
M N 20
L M 70
N L 40
N K 100
M N 10
N M 5
Row 1 implies that M owed 20 Rs to N Row 2 implies that L owed 70 Rs to M Similar to other rows Given the above info, design a solution to derive the below-mentioned insights :
How much debt does each person owe to all users?
How much money is a person owed ?
Who is the person with the most money owed ?
Who is the person with the most debt ?
Sample input in CSV:
M,N,20
L,M,70
N,L,40
N,K,100
M,N,10
N,M,5