Run error appeared

at line no 91
correct statement is

root= deletein(root,a);
you forgot to update root
that’s why it is giving run error when root node will be deleted

i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved
if you have more doubts regarding this feel free to ask