i'm having trouble on how can i insert a node at the start of the list. i figured out on how can i insert a node at the start of the list if it's empty but i don't know how can i insert a node at the start of the list if the start_ptr != NULL.
if(start_ptr == 0){
//temp will be the only node in the list. It will be both first and last, therefore
temp->next = 0;
}else{
//there are more nodes, so temp->next will have to lead to them
temp->next = start_ptr;
}
start_ptr = temp;//needed in both cases