reorder list
class Solution {
public void reorderList(ListNode head) {
if (head == null || head.next == null) return;
// Step 1: Find the middle node using slow and fast pointers
ListNode slow = head;
ListNode fast = head;
...
yesamitsingh.hashnode.dev1 min read