So I came across this question during an interview and was unable to solve it. Hopefully, someone can advise. The problem is this.
Imagine you have S amounts of savin