Tools / Data structures Interview questions
How do I find middle element of linked list?
To find the middle element of linked list in one pass, you may maintain two-pointer, one increment at each node while other increment after two nodes at a time so that when first pointer reaches end, second pointer will point to middle element of linked list.
More Related questions...