assignment 1: problem 5 - happiest state

Signed-off-by: Yi Zou <yi.zou.linux@gmail.com>