how would i go about creating a function that will allow me to insert a new node at any index within a linked list? here\'s the struct:
struct node {
int
As you can see in the image below, you need to insert the node between two nodes.
The other 3 cases are
Maintain a count and loop through all the elements in the list. This count will help you keep track of the index.
Once you reach the node, where you have to insert the new node
Full Source Code available here