why it is showing time exceed,
please point out,
i don’t understand .
Run time exceed
Please send the link of the question also
In the length function, you missed out “root=root->next” in the while loop.
And in the insert function, you are missing the condition when root=NULL.