Skip to content

Added intro to linked list tutorial#68

Open
JacobGa03 wants to merge 16 commits intomainfrom
linked-list-basics
Open

Added intro to linked list tutorial#68
JacobGa03 wants to merge 16 commits intomainfrom
linked-list-basics

Conversation

@JacobGa03
Copy link
Contributor

Added "Linked List Basics" tutorial to the linked list section.

Added "Linked List Basics" tutorial to the linked list section.
Copy link
Member

@jerrettl jerrettl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NULL has a box around it, but NULL doesn't represent a node like the others. Instead, it is just a value set on another node's ->next member. It may be worth considering whether simple pointer variables like tempHead get 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!

Comment on lines 281 to 294
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps for NULL we can just use an X like I used for the binary trees?

JacobGa03 and others added 15 commits August 5, 2024 16:56
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 📝 In review

Development

Successfully merging this pull request may close these issues.

2 participants