Flatiron Health Interview Question

basic question regarding sorting, etc