Sollicitatievraag bij Meta

Solve a coding question with relatively high efficiency.