I know that singly linked lists are made of nodes where each node has a pointer to the next node (or null to end the list), but graphs also have nodes with data and pointers to the next.
So what's the essential difference between the data structure Linked List and Graph? And how about the List-based search and Graph-based search?
It is not true, linked list also have data in it's nodes!(why do you want to have a list of nodes without any information?), In fact from mathematical view a linked list is some sort of graph.
The main difference between graph in general and linked list is that a node in linked list could at most have two pointers(one to its next and one to its previous node) but a node in graph could have more than two pointers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With