This
preview
has intentionally blurred sections.
Sign up to view the full version.
This
preview
has intentionally blurred sections.
Sign up to view the full version.
This
preview
has intentionally blurred sections.
Sign up to view the full version.
This
preview
has intentionally blurred sections.
Sign up to view the full version.
This
preview
has intentionally blurred sections.
Sign up to view the full version.
Unformatted text preview: Insert/Remove at front: Insert at given location: Remove at given location: Insert at arbitrary location: Remove at arbitrary location: Many many different variations on linked lists: In lab and MP3 you’ll use a doubly linked list Circularly linked list Ladder list Any kind of crazy linked structure you can imagine. To practice your skills: www.digitaltutor.net Another technique for linking memory: Doubly linked lists head tail struct listNode { LIT element; Node * prev; Node * next; //constructor(s) } void insert(listNode * curr, int k, LIT e) { listNode * p = Find(_____, curr); listNode * t = new listNode(e); } Removing k th node of a doubly linked list: head tail struct listNode { LIT element; Node * prev; Node * next; } void remove(listNode * curr, int k, LIT e) { listNode * p = Find(_____, curr); }...
View
Full Document
- Spring '09
- Heeren
- Insert new node
-
Click to edit the document details