Intuit Interview Question

Q: Coding Question, medium difficulty