Ramp Interview Question

2 DSA questions on hackerrank