Delete nodes from bst

the testcases aren’t clearing but i think the code is right
check it out : https://ide.codingblocks.com/s/229962

hello @adityathaker28
dont form a balanced bst,form simple bst and then perform deletion.

although in both types of tree same nodes get deleted but their preorder will be different and therefore it will show wrong answer.

how do i make a simple bst from just one array?

traverse the array from 0 to n-1 and insert that element in ur bst.

oh that slipped my mind,thank you

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.