Fullstack sorting exercise