EyeNewz Tech Get the app

Geeksforgeeks · Technology

Rearrange a linked list in alternat first and last

Given a singly linked list L0 -> L1 -> ... -> Ln-1 -> Ln. Rearrange the nodes in the list so that the newly formed list is : L0 -> Ln -> L1 -> Ln-1 -> L2 -> Ln-2 ... You are required to do this in place without altering

Read original Open in app

Licensed summary · LicensedSummary