mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-17 03:07:35 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
3ab0f7e585
commit
5d98fd74dc
@ -116,7 +116,7 @@ class SortedLinkedList:
|
|||||||
>>> linkedList.insert(57)
|
>>> linkedList.insert(57)
|
||||||
>>> linkedList.insert(45)
|
>>> linkedList.insert(45)
|
||||||
>>> linkedList.display()
|
>>> linkedList.display()
|
||||||
32 45 57
|
32 45 57
|
||||||
"""
|
"""
|
||||||
temp: Optional[Node] = self.head
|
temp: Optional[Node] = self.head
|
||||||
while temp:
|
while temp:
|
||||||
@ -144,11 +144,11 @@ class SortedLinkedList:
|
|||||||
>>> linkedList.insert(57)
|
>>> linkedList.insert(57)
|
||||||
>>> linkedList.insert(45)
|
>>> linkedList.insert(45)
|
||||||
>>> linkedList.display()
|
>>> linkedList.display()
|
||||||
32 45 57
|
32 45 57
|
||||||
>>> linkedList.delete(45)
|
>>> linkedList.delete(45)
|
||||||
True
|
True
|
||||||
>>> linkedList.display()
|
>>> linkedList.display()
|
||||||
32 57
|
32 57
|
||||||
"""
|
"""
|
||||||
if self.head is None:
|
if self.head is None:
|
||||||
return False
|
return False
|
||||||
@ -296,10 +296,10 @@ class SortedLinkedList:
|
|||||||
>>> linkedList.insert(45)
|
>>> linkedList.insert(45)
|
||||||
>>> linkedList.insert(45)
|
>>> linkedList.insert(45)
|
||||||
>>> linkedList.display()
|
>>> linkedList.display()
|
||||||
32 45 45 57
|
32 45 45 57
|
||||||
>>> linkedList.remove_duplicates()
|
>>> linkedList.remove_duplicates()
|
||||||
>>> linkedList.display()
|
>>> linkedList.display()
|
||||||
32 45 57
|
32 45 57
|
||||||
"""
|
"""
|
||||||
|
|
||||||
temp: Optional[Node] = self.head
|
temp: Optional[Node] = self.head
|
||||||
@ -327,7 +327,7 @@ class SortedLinkedList:
|
|||||||
>>> linkedList2.insert(95)
|
>>> linkedList2.insert(95)
|
||||||
>>> linkedList.merge(linkedList2)
|
>>> linkedList.merge(linkedList2)
|
||||||
>>> linkedList.display()
|
>>> linkedList.display()
|
||||||
23 32 45 47 57 95
|
23 32 45 47 57 95
|
||||||
"""
|
"""
|
||||||
if other_list.head is None:
|
if other_list.head is None:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user