Suppose root is your pointer that is pointing to the first node, you may have two possible solutions.
1. If you only want to check immediate node only, do root.getnext().getvalue().
2. If you want...