Apple Interview Question

it was a CTF like lab test