Ramp Interview Question

4 Part Online Coding question