A solution to solve a Facebook puzzle given to Front-End Engineer applicants