hello @Arpan_Goswami this should be root=deleteNode(root,x);
Thanks. Silly mistake on my part. Have marked it resolved