MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / Node

Class Node

data_structures/heap/min_heap.py:5–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3
4
5class Node:
6 def __init__(self, name, val):
7 self.name = name
8 self.val = val
9
10 def __str__(self):
11 return f"{self.__class__.__name__}({self.name}, {self.val})"
12
13 def __lt__(self, other):
14 return self.val < other.val
15
16
17class MinHeap:

Callers 1

min_heap.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected