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

Method value

data_structures/heap/randomized_heap.py:24–35  ·  view source on GitHub ↗

Return the value of the node. >>> rhn = RandomizedHeapNode(10) >>> rhn.value 10 >>> rhn = RandomizedHeapNode(-10) >>> rhn.value -10

(self)

Source from the content-addressed store, hash-verified

22
23 @property
24 def value(self) -> T:
25 """
26 Return the value of the node.
27
28 >>> rhn = RandomizedHeapNode(10)
29 >>> rhn.value
30 10
31 >>> rhn = RandomizedHeapNode(-10)
32 >>> rhn.value
33 -10
34 """
35 return self._value
36
37 @staticmethod
38 def merge(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected