Lab Practical #1

Given the singly-linked-list Node structure:
struct Node
{
	int val;
	Node* next;
};	
		
write a function
Node* insert(Node* head, int val, int pos);
		
that inserts a new node with "val" as its value in position "pos" of the linked list beginning at "head", and returns the new head of the linked list. (pos == 0 implies insert at head, pos == 1 is insert after the head, etc.)

Remember to allocate memory for the new Node.