How will i build tree without using queue from this data only??
How can i build Binary tree?
hello @codingblockscpp`
without using queue, I guess logic will be same as construction of heap (the way we construct heap from array).
i,e if parent is at index i then its children will be at index 2i ,2i+1 (or 2i+1 ,2*i+2 depends on implementation)
Can u send me code??
i dont have code for it .you can try on ur own .
if u stuck anywhere then i will help u.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.