You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/lectures/data/DLList.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,5 +16,5 @@ The main differences with *singly* linked list are as follows:
16
16
- Instead of keeping only track of the first element (`first`), we keep track of both the first (`head`) and last (`tail`) elements.
17
17
- Each `Cell` contains a pointer to the "next" element (as before), but also to the "previous" element.
18
18
- Adding (or removing) to the right is now done in constant time, instead of linear time.
19
-
- Traversing the list in opposite order (from end to beginning) is now straightforward (cf. the `ToString` method above).
20
-
- The rest of the edits are about bookkeeping the `Previous` and `Next` attributes of the `Cell`, as well as updating the `tail` attribute.
19
+
- Traversing the list in opposite order (from end to beginning, or right to left) is now straightforward (cf. the `ToString` method above).
20
+
- The rest of the edits are about bookkeeping the `Previous` and `Next` attributes of the `Cell`, as well as updating the `tail` attribute. This makes removing and adding "in the middle of the list" a bit tricky.
0 commit comments