this blog will give information about vlsi for every vlsi students

Wednesday 15 July 2015

C PROGRAMMING AND DATA STUCTURE

C PROGRAMMING AND DATA STRUCTURE

  1. It is a data Structure which consists if group of nodes that forms a sequence.
  2. It is very common data structure that is used to create tree,graph and other abstract data types.
NoElementExplanation
1NodeLinked list is collection of number of nodes
2Address Field in NodeAddress field in node is used to keep address of next node
3Data Field in NodeData field in node is used to hold data inside linked list.

Advantages of linked list

Addres and Linked List Node Strucutre in Programming

List of advantages :
  1. Linked List is Dynamic data Structure .
  2. Linked List can grow and shrink during run time.
  3. Insertion and Deletion Operations are Easier
  4. Efficient Memory Utilization ,i.e no need to pre-allocate memory
  5. Faster Access time,can be expanded in constant time without memory overhead
  6. Linear Data Structures such as Stack,Queue can be easily implemeted using Linked list
  1. llocate as much memory as we can.
  2. Though you can allocate any number of nodes, still there is limit for allocation of memory . (We can allocate memory considering that heap size will not be exceeded)
Re-commanded article : Dynamic memory allocation

2. Insertion and Deletion Operations are easy

  1. Insertion and Deletion operations in Linked List is very flexible.
  2. We can insert any node at any place easily and similarly we can remove it easily.
  3. We don’t have to shift nodes like array insertion. In Insertion operation in linked list , we have to just update next link of node.

3. Memory Utilization

  1. As explained earlier we don’t have to allocate memory at compile time.
  2. Memory is allocated at run time as per requirement, so that Linked list data structure provides us strong command on memory utilization.
Singly-linked-list in c programming

No comments:

Post a Comment

LOGIC GATES

LOGIC GATES: