Skip to content

Commit

Permalink
Update 10.2.md
Browse files Browse the repository at this point in the history
Edited Ex. 10.2-1. You can delete a node from the list in O(1) time if you pass to argument a node you want to delete.
  • Loading branch information
moonik authored and Jay Chen committed Apr 5, 2019
1 parent dc2c847 commit 0c36a10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Chap10/10.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
L.head = x
```

- $\text{DELETE}$: cannot be implemented in constant time, unless you pass to it as an argument the predecessor of the element you are deleting.
- $\text{DELETE}$: you can copy the value from the successor to element you want to delete, and then you can delete the successor in $O(1)$ time. This solution is not good in situations when you have a large object, in that case copying the whole object will be a bad idea.

## 10.2-2

Expand Down

0 comments on commit 0c36a10

Please sign in to comment.