The problem states that:
- The function should be an iterative function and should return the middle of the linked list.
- make sure to not use size data member directly or indirectly (by calculating size via making a traversal)
- In the linked list of even size, consider the end of the first half as mid.
- Size property should not be used directly or indirectly.
- Constant time, single traversal is expected.
- Iterative solution, (not recursion) is expected.
Figure 1 depicts the mid node for an odd and an even linked list.
The strategy for this question is the Two Pointer Approach.