Https://ide.codingblocks.com/s/607589

cn you check my code why it is giving segmentation fault

in the insert function
image

this else condition should not be there
we have to go left every time if bit is 0
so no else condition

similarly for if(bit ==1) case

Modified Code

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.