Zühlke interview question

Sort and filter array of objects based on the information provided