Conversation
Added "Linked List Basics" tutorial to the linked list section.
jerrettl
left a comment
There was a problem hiding this comment.
Okay I think I am done getting through everything whew! As before, this covers a really nice breadth of a lot of details and information!
All I have are more little details here and there to make it all as clear as possible for the reader. I remember back when seeing students in office hours and how important it was to get all the little terms and precision, especially when dealing with pointers. (AVL self-balancing algorithms were also a doozy in this regard.) There are other spots, but hopefully that gives a general idea of what I am thinking. Hopefully this wasn't too crazy, so same thing, comments from #62 and #67 apply here, and just real minor stuff throughout.
-
This is completely a subjective thing, but for the diagrams I see everything is surrounded by a box. This is good for visuals, but I worry this may be a little confusing as it appears like everything is a node, when in some cases they aren't actually nodes. Like
NULLhas a box around it, butNULLdoesn't represent a node like the others. Instead, it is just a value set on another node's->nextmember. It may be worth considering whether simple pointer variables liketempHeadget the same boxing as a full node structure as well, since this kind of looks like it's an extra node in the chain altogether. -
For readability, when the arrows start getting more complicated towards the end, you may consider using these Unicode box drawing characters. They're a bit of a pain in the neck to use, but can come out looking really cool!
| Just like before, we will need a temporary node to traverse the rest of the list. Once we find the node RIGHT BEFORE `15`, then we can perform the "patch over" and deletion of `15`. | ||
|
|
||
| ``` | ||
| +------+ +------+ +------+ +------+ | ||
| | 11 | -> | 15 | -> | 18 | -> | NULL | | ||
| +------+ +------+ +------+ +------+ | ||
| ^ | ||
| | | ||
| +----------+ | ||
| | tempHead | | ||
| +----------+ | ||
| ``` | ||
|
|
||
| Once we are here we will save `15` in another temporary node, then "patch over", then free `15. |
There was a problem hiding this comment.
Same as earlier, should this be a temporary node or a temporary pointer? Since we are working with these new concepts in linked lists, that distinction can be very important! (From experience as a TA you can never be too careful with thinking that a student will assume to know what you mean.)
There was a problem hiding this comment.
Perhaps for NULL we can just use an X like I used for the binary trees?
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Co-authored-by: Jerrett Longworth <jerrett7@gmail.com>
Fixed up some of the `text` descriptions of the different algorithms. Made it so `NULL` is now `X`. It is also stated that the end of the list points to null.
Added "Linked List Basics" tutorial to the linked list section.