Postingan

Linked List

Gambar
Linked List vs Array Array  : ·          Linear collection of data elements ·          Store value in consecutive memory locations ·          Can be random in accessing of data Linked List  : ·          Linear collection of nodes ·          Doesn’t store its nodes in consecutive memory locations ·          Can be accessed only in a sequential manner Single Linked List is a linked list which node contain only a  single link to other node To create a linked list, we need to  define a node structure Insert To insert a new value, first we should dynamically  allocate a new node  and  assign the value to it  and then  connect it  wi...