465. Optimal Account Balancing

first, found the len is so samll, so it must a dfs backtracking problem

T: O(n!), not sure, n is transactions array size

S: O(n)

global variable version

Last updated

Was this helpful?