uni

Thing1's amazing uni repo
Log | Files | Refs | Submodules

commit 18a2e8353784f0cf97e75d4eed7026f664675ce4
parent a6333dc74a1fe73077d317640aa262d0550def2c
Author: thing1 <thing1@seacrossedlovers.xyz>
Date:   Mon, 20 Apr 2026 10:04:00 +0100

notes from long ago

Diffstat:
ACS10720/24.03.26.md | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/CS10720/24.03.26.md b/CS10720/24.03.26.md @@ -0,0 +1,12 @@ +# 24/03/26 + +- visulize arrays like so (binary tree) +``` + 0 + 1 2 + 3 4 5 6 +``` +- given the parent's index is I the left child's index is 2i + 1, and for the right child is 2i + 2 +- for the children, the parent's index can be found as (i - 1) / 2 (rounded down) + +- max heap is a btree where a parent's value is greater than or equal to the values of its children, not the sum