Thursday 7 January 2016

What is difference between Singly Linked List and Doubly Linked List data structure?

What is difference between Singly Linked List and Doubly Linked List data structure?
This is another classical interview question on data structures, mostly asked on telephonic rounds. Main difference between singly linked list and doubly linked list is ability to traverse. In a single linked list, node only points towards next node, and there is no pointer to previous node, which means you can not traverse back on a singly linked list. On the other hand doubly linked list maintains two pointers, towards next and previous node, which allows you to navigate in both direction in any linked list.
http://www.spcjaipur.com/java-training-institute-in-jaipur.aspx
 

0 comments:

Post a Comment