Usually we use the tree data structure when we care about time complexity for ins/del/...
-In this special case problem, space saving is mandatory too that is 2 pointers for each node is unaffordable; actual data are in leaves so infact even the internal nodes are considered overhead
-So, I thought of storing it as a 2D array with variable row size, we can assume the tree is almost always full complete power of 2, something like
R[0]= N leaf nodes
R[1]= N/2 level-1 nodes
R[2]= N/4 nodes
.. ..
R[logN]= root
-I can derive the formulas for del/ins/... as the tree is easily mind-vewable from this presentation, without any pointers at all.
-Now, did I miss something???
-Is there any flaw in this?
-I'm checking for brainstorming or some opinions.