அல்கோரிதம்binary heap
Binary heap
TT
Testlaa Team
May 14, 2026•1 min read
Parent/child index formulas.
Try this in Python
def parent(i):
return (i - 1) // 2
print(parent(5), parent(0))
Key takeaways
- Indexing base consistent.
- Height log n.
- Complete tree.
Tags:
HeapsPythonமாணவர்கள்
