मराठी
महाराष्ट्र राज्य शिक्षण मंडळएचएससी विज्ञान (संगणक विज्ञान) इयत्ता १२ वी

How linked list are represented in Memory? - Computer Science 1

Advertisements
Advertisements

प्रश्न

How linked list are represented in Memory?

How linked list represent in memory.

Explain memory representation of linked list with a suitable example.

स्पष्ट करा
दीर्घउत्तर
Advertisements

उत्तर

  1. A linked list can be stored in memory using two arrays called INFO and LINK, where INFO[K] stores the data of the node and LINK[K] stores the address of the next node.
  2. The list also needs a variable named START (or NAME) that holds the address of the first node. The pointer field of the last node contains NULL, indicating the end of the list. For example, consider the linked list shown below:
  3. The linked list can be represented in memory as:

Above figure shows linked list. It indicates that the node of a list need not occupy adjacent elements in the array INFO and LINK.

shaalaa.com
Basic Data Structures (Stack, Queue, Dequeue)
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2016-2017 (March)
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×