Find the last node of the list as it will be pointing to the head
while ( current . next != head_ref ) : NEW_LINE INDENT current = current . next NEW_LINE DEDENT current . next = new_node NEW_LINE new_node . next = head_ref NEW_LINE head_ref = new_node NEW_LINE else : NEW_LINE