RBC Interview Question

an easy leetcode /med question