+1 (218) 451-4151
glass
pen
clip
papers
heaphones

1. Describe in detail how to swap two nodes x and y (and not just their contents) in a singly…

1. Describe in detail how to swap two nodes x and y (and not just their contents) in a singly…

1. Describe in detail how to swap two nodes x and y (and not just their contents) in a singly linked list L given references only to x and y. Repeat this exercise for the case when L is a doubly linked list. Which algorithm takes more time?2. Describe in detail an algorithm for reversing a singly linked list L using only a constant amount of additional space.