Savvy Wealth interview question

Most technical challenge I solved.