Meta interview question

solving and debugging a code