pMD Interview Question

Hand write code with pencil and paper.