Posts

linked list

Image
 linked list - linked list is a non-primitive linear  data structure, it is the collection of nodes & a start pointer. Each element (we will call it a  node ) of a list is contain or stores 2 items. 1. Data of the node 2. address(reference) of the node  ** The last node has a reference to NULL . **  The entry point into a linked list is called the  head  of the list. note :  #  If the list is empty then the head is a null reference.  # pointer have 4 bytes data always in 32 bits compiler. # pointer independent from data type. # pointer contain base address, its size depend upon compiler. advantages : 1. a linked list is a dynamic data structure. 2.  The number of nodes in a list is not fixed and can grow and shrink on demand. disadvantages : 1. it use more memory compare with an array. 2.  it does not allow direct access to the individual elements. there   are   3   type...