Skip to content

Commit ab63be8

Browse files
ClémentClément
authored andcommitted
Added some notes on DLLists.
1 parent a3598c3 commit ab63be8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/lectures/data/DLList.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ The main differences with *singly* linked list are as follows:
1616
- Instead of keeping only track of the first element (`first`), we keep track of both the first (`head`) and last (`tail`) elements.
1717
- Each `Cell` contains a pointer to the "next" element (as before), but also to the "previous" element.
1818
- 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

Comments
 (0)