Skip to content

Commit c4516d1

Browse files
committed
Added tests and docstrings to fibonacci_heap.py
1 parent a1291fd commit c4516d1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

data_structures/heap/fibonacci_heap.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ def __consolidate(self):
271271
def decrease_key(self, node, new_val):
272272
"""
273273
Decreases the value of a node.
274-
274+
275275
Args:
276276
node: The node whose value should be decreased.
277277
new_val: The new value for the node.
278-
278+
279279
Raises:
280280
ValueError: If new value is greater than current value.
281281
"""
@@ -299,11 +299,6 @@ def __cut(self, node, parent):
299299
Args:
300300
node: Node to be cut.
301301
parent: Parent of the node to be cut.
302-
""""""
303-
Performs cascading cut operation.
304-
305-
Args:
306-
node: Starting node for cascading cut.
307302
"""
308303

309304
parent.degree -= 1

0 commit comments

Comments
 (0)