As we are going to implement Family tree using Generalized link list,Let us understand what a generalized link list is and how we are going to implement it.
- Generalized Linked List L, is defined as a finite sequence of elements in which each element can be atom or group of atom.
- A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations .
The elements in a linked list are linked using pointers as shown below
A generalized link list consists of some extra fields such a as Flag,down pointer.
1)Flag is used to indicate the type of information stored by the node.
2)Down pointer is used if any element in the list is sub list.
A general node structure of generalized link list is as shown below:
we can assign values in flag as per our convenience.
e.g Flag=0 implies node consist of data
Flag=1 implies next pointer
Flag=2 implies down pointer
Given below is a structure of general lists consisting of sub list.
1)In above example,in list A first node is a atom variable a.hence flag is equal to 1.
The second atom of list A is sub list-((b,c). the second node will be down pointer pointing to sub list,
2)In Sub list both atom are variables(data).Hence Flag is equal to 0.
So,now from the above discussion I think that all of you are cleared with what a generalized link list looks like and how we store the data in it.
In further posts i will give the hole idea for family tree using Generalized link list...
If anyone having doubts in the concepts dicusussed in post can comment below and if you like our posts,dont forget to share it...
Thank you...
great work
ReplyDeleteconcept got cleared
ReplyDeletethanks...means a lot!
DeleteInformative
ReplyDeletethank you!!
Deletenice
ReplyDeletethanks bro
Deletecoding part is impressive
ReplyDeleteHelpful to get the idea of data structure application, particularly linked list.
ReplyDeletekeep motivating!!
DeleteNice work.....great read
ReplyDeleteGood Explanation
ReplyDeletethanks for the appreciation
DeleteInformative article.
ReplyDeletethank you
ReplyDeleteIt really helped me to clear the concept of linked list ..... Awesome work team .... Keep it up π―π―π―π―π―
ReplyDeleteInformative post
ReplyDeleteHelpful!
ReplyDeletevery impressive workπ
ReplyDeleteGood blog
ReplyDeleteGood content creation
ReplyDeleteGood Content ND well explained π
ReplyDeleteNicely explained..
ReplyDelete