Company: Arista_27_Dec
Difficulty: medium
Minimum Transactions to Settle Debts Problem Description A debt tracking app records transactions showing who paid whom and how much. Each transaction includes a borrower, a lender, and an amount. Given a list of transactions, determine the minimum number of transactions required to settle all debts. Example Suppose the number of people ( n ) = 3, the number of transactions ( m ) = 4, and transactions = [[0, 1, 20], [1, 0, 5], [1, 2, 10], [2, 0, 10]]. Each transaction is represented as [from, to, amount] , meaning: Person 0 owes person 1 $20 Person 1 owes person 0 $5 Person 1 owes person 2 $10 Person 2 owes person 0 $10 After simplification, only one transaction is needed: Person 0 pays $15 to person 1. Therefore, the minimum number of transactions required is 1. Constraints 2 ≤ n ≤ 9 2 ≤ m ≤ 10 5 0 ≤ debt[i][0], debt[i][1] 1 ≤ debt[i][2] ≤ 10 9 Function Signature The function to be completed is getMinTransactions in Java. /** * Complete the 'getMinTransactions' fu