Skip to content

Commit

Permalink
some mistakes in delete method and time comlexity (trekhleb#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
linghuam authored and trekhleb committed Mar 22, 2019
1 parent db83ec2 commit 3eab9ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data-structures/doubly-linked-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Remove(head, value)
return true
end if
n ← head.next
while n = ø and value = n.value
while n = ø and value !== n.value
n ← n.next
end while
if n = tail
Expand Down Expand Up @@ -100,7 +100,7 @@ end Reverse Traversal

| Access | Search | Insertion | Deletion |
| :-------: | :-------: | :-------: | :-------: |
| O(n) | O(n) | O(1) | O(1) |
| O(n) | O(n) | O(1) | O(n) |

### Space Complexity

Expand Down

0 comments on commit 3eab9ee

Please sign in to comment.