Oscar Health interview question

Hackerrank test that was not really hard.