Hi, i'm do a program about list , and a list that I do is this:
placed alternating ends of the list where scores tasks , ie he takes the first task and insert the left end of the list, then the next task is placed at the right end , the third is placed at the left end and so again.
and so, I got the list that insert to last node and I am doing the list that insert to begging the list , but I no idea how do that list.
Actually inserting at the beginning is easier than inserting at the end. If "head" points to the first item in the list and "item" is a new item to insert then it's something like this: