Reverse a linked list between nodes with equal values
In a singly linked list, whenever two nodes hold the same value, reverse the part of the list between them. Clarify with the interviewer which pairs count and whether the matching nodes themselves move, then do it in place in one pass.
No answer yet. Write the first one; the best answer gets endorsed.
