30,494 views
44 votes
44 votes
Write an algorithm to find who in the group has the smallest negative balance.

Input:




The input to the function/method consists of three arguments:




numRows, an integer representing the number of debt records.




numCols, an integer representing th enumber of elements in debt records. It is always 3.




debts, a list of triplet representing debtRecord consisting of a string borrower, a string lender, and an integer




amount, representing the debt record.




Output:




Return a list of strings representing an alphabetically ordered list of members with the smallest negative balance.




If no team member has a negative balance then return a list containing the string "Nobody has a negative balance".




Constraints:




1 ≤ numRows ≤ 2*10^5

User Jjnevis
by
2.4k points

1 Answer

18 votes
18 votes

eAnswer:b

no lo entiendo

Step-by-step explanation:

que

User Nils Zenker
by
3.2k points