- change to pass in head pointer in contains() and print_nodes().
- change pop() to return int value to avoid memory leak.
- change contains() to return int value to comply with const Node *head.
- rename tmp to meaningful names.
- change to use if(ptr) or (!ptr) for null pointer check.
- add print_case() for clear readability.