LL 4 - Reverse a Doubly Linked List
Jul 28, 2024 · 2 min read · Problem Given a doubly linked list of n elements. Your task is to reverse the doubly linked list in-place. Example 1: Input: LinkedList: 3 <--> 4 <--> 5 Output: 5 4 3 Example 2: Input: LinkedList: 75 <--> 122 <--> 59 <--> 196 Output: 196 59 122 75...
Join discussion