8.Middle of the Linked List
Solution I
This approach has a time complexity of O(n) but we need to iterate the list a number of times.
Solution II (Using two pointers)
This solution is using fast pointer and slow pointer. Time Complexity O(n).
Last updated