hi, the provided code replaces the index for each character it traverses during insertion, instead the index can be set in the node during the creation itself.
@dty909717 күн бұрын
no, we are checking if that particular node hi present or not. if not, then we are adding the node with the index provided else we are just traversing without replacing any index.