From 3eab9eef406995841d41114b416c0e1575d6c08c Mon Sep 17 00:00:00 2001 From: linghuam Date: Fri, 22 Mar 2019 13:29:50 +0800 Subject: [PATCH] some mistakes in delete method and time comlexity (#322) --- src/data-structures/doubly-linked-list/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data-structures/doubly-linked-list/README.md b/src/data-structures/doubly-linked-list/README.md index 5d693d26..3a39281b 100644 --- a/src/data-structures/doubly-linked-list/README.md +++ b/src/data-structures/doubly-linked-list/README.md @@ -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 @@ -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