how to find middle element of linked list in one pass in java