Ripple interview question

Two leetcode medium questions and background discussion