Node temp = new Node(6,head,head.getNext());
Node temp1 = new Node(0,tail.getPrev(),tail);
head.setNext(temp);
temp.getNext().setPrev(temp);
tail.setPrev(temp1);
temp1.getPrev().setNext(temp1);
a) head-0-1-2-3-4-5-6-tail
b) head-1-2-3-4-5-6-tail
c) head-6-1-2-3-4-5-0-tail
d) head-0-1-2-3-4-5-tail
Consider the following doubly linked list: head-1-2-3-4-5-tail. What will be the list after performing the given sequenc
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Consider the following doubly linked list: head-1-2-3-4-5-tail. What will be the list after performing the given sequenc
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!