From 660976f1c731b190d8f2c1b3d95eb5444dabdc84 Mon Sep 17 00:00:00 2001 From: mcawezome <20085898@tafe.wa.edu.au> Date: Mon, 25 Nov 2024 13:10:34 +1100 Subject: [PATCH] Added complete implementation of Fibonacci Heap --- data_structures/heap/fibonacci_heap.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data_structures/heap/fibonacci_heap.py b/data_structures/heap/fibonacci_heap.py index d68fdde6b..4caaa00fd 100644 --- a/data_structures/heap/fibonacci_heap.py +++ b/data_structures/heap/fibonacci_heap.py @@ -38,9 +38,11 @@ class FibonacciHeapNode: degree (int): The number of children of this node. parent (FibonacciHeapNode): The parent of this node. child (FibonacciHeapNode): The first child of this node. - mark (bool): Whether this node has lost a child since it became a child of another node. + mark (bool): Whether this node has + lost a child since it became a child of another node. next (FibonacciHeapNode): The next sibling in the circular doubly-linked list. - prev (FibonacciHeapNode): The previous sibling in the circular doubly-linked list. + prev (FibonacciHeapNode): The previous sibling + in the circular doubly-linked list. """ def __init__(self, key, value=None):