Solve EPI "Dutch National Flag" problem