Day 49 - MiddleMost Node Search
Given a singly linked list, find itβs middle-most element, without knowing the size of the linked list or using any counter variable.
Example
given linked list: 1 -> 2 -> 3
output: 2
given linked list: 1 -> 2 -> 3 -> 4
output: 2
HINT
π Make 2 pointer variables which would iterate over the Linked List, such that in each iteration, first variable moves 1 step forward, and the second pointer variable moves 2 steps forward.
π When the second pointer reaches the end, first pointer would reach to the middlemost element
Solution
JavaScript Implementation
Solution
// To Be Added