About a more intuitive linked list representation method

59 views
Skip to first unread message

张铂坤

unread,
Mar 24, 2024, 7:54:27 AMMar 24
to dart-gsoc
Hello,I‘m new in gsoc,I have a idea for dart.
it's about linked list,I will Upload some files to explain the idea more visually.
I am a user of C++, and creating linked lists troubles me, so I thought of a more superficial way to create linked lists.
I want to use the following way to create:
This is the expected way to create a singly linked list:
|HEAD|ptr1->| |something1|ptr2->| |something2|...->| |the last|ptr3->||NULL|
This is the expected way to create a singly linked list.
|HEAD| is the Head of singly linked list,|ptr1->|is the pointer points to the next bit in the linked list,The complete status of a block in the linked list is |something1|ptr2->|.
and This is the expected way to create a doubly linked list.
|HEAD|ptr1->| |<-PTR1|something1|ptr2->| |<-PTR2|something2|...->| |<-PTRn||the last|ptr3->||NULL|
|<-PTR1|something1|ptr2->| 
Two pointers are declared to link the two blocks ,The rest is similar to a singly linked list.

These are rough ideas, unfortunately I don't have enough knowledge to implement it, so I think this is the best place to express it.

Reply all
Reply to author
Forward
0 new messages