CME interview question

Hackerrank coding test focusing on basic data structures and algorithms.