Check whether the node is already in the results.
The node to check.
The list of current optimal nodes.
Whether the node is in the results or not.