Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3eab9ee

Browse files
linghuamtrekhleb
authored andcommitted
some mistakes in delete method and time comlexity (trekhleb#322)
1 parentdb83ec2 commit3eab9ee

File tree

1 file changed

+2
-2
lines changed
  • src/data-structures/doubly-linked-list

1 file changed

+2
-2
lines changed

‎src/data-structures/doubly-linked-list/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Remove(head, value)
6464
return true
6565
end if
6666
n ← head.next
67-
while n = ø and value = n.value
67+
while n = ø and value!== n.value
6868
n ← n.next
6969
end while
7070
if n = tail
@@ -100,7 +100,7 @@ end Reverse Traversal
100100

101101
| Access| Search| Insertion| Deletion|
102102
| :-------:| :-------:| :-------:| :-------:|
103-
| O(n)| O(n)| O(1)| O(1)|
103+
| O(n)| O(n)| O(1)| O(n)|
104104

105105
###Space Complexity
106106

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp