Ripple Interview Question

LeetCode Easy. Straight forward coding Q's