How to make two-link data structures | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to make two-link data structures

Student informetion. https://code.sololearn.com/W85IvoQXZBZD/?ref=app

26th Oct 2019, 7:35 AM
Devrim
Devrim - avatar
8 Answers
0
In C language you can do that by creating a structure with two pointers. This method is used in doubly linked list. For eg- struct node{ struct node *tail; int data; struct node *head; } //The above structure now has two links and it is also a user defined data type.
1st Nov 2019, 1:04 PM
Avinesh
Avinesh - avatar
0
İ am understand thanks
1st Nov 2019, 1:57 PM
Devrim
Devrim - avatar
0
İs it one-way
1st Nov 2019, 2:00 PM
Devrim
Devrim - avatar
0
For making it one way you can remove the tail pointer.
1st Nov 2019, 2:05 PM
Avinesh
Avinesh - avatar
0
Examing student1-->student2-->student3-->null Student1--> lesson1--> lesson2-->null Student2-->lesson3-->lesson1-->null Student3-->lesson2-->lesson1-->null
1st Nov 2019, 2:12 PM
Devrim
Devrim - avatar
0
This like
1st Nov 2019, 2:13 PM
Devrim
Devrim - avatar
0
Correct👍
1st Nov 2019, 2:16 PM
Avinesh
Avinesh - avatar
0
But Class student {} And class lesson {} How Do we lesson==student student-->lesson-->null
1st Nov 2019, 2:24 PM
Devrim
Devrim - avatar