After learning about Doubly Linked Lists, Come up with at least 2 reasons why you would use a Doubly Linked List instead of a regular (single) Linked List and then come up with at least 2 reasons why you would use a single Linked List instead of Doubly Linked List.
When you have requirement to iterate in both directions (forward and backward) than we will use DLL because in SLL we dont have option to iterate backward. in DLL we have pointers for next and prev so we can navigate both ways
So it takes more memory compare to SLL as we need to maintain extra pointer for each node
We will use SLL when we requirement to iterate only forward dicrections as it saves lot of memory
NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.
I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME
Get Answers For Free
Most questions answered within 1 hours.