Ramp Interview Question

online coding assessment, string manipulation