Use C The parameter to the following two recursive routines
Use C++
The parameter to the following two recursive routines is a pointer to a singly linked list of numbers, whose elements are unique (no duplicates) and unsorted. Each node in the list contains two members, info (a number) and next (a pointer to the next node). Write a recursive value-returning function, MinLoc, that receives a pointer to a list of unsorted numbers and returns a pointer to the node that contains the minimum value in the list. Write a recursive void function, Sort, that receives a pointer to an unsorted list of numbers and reorders the values in the list from smallest to largest. This function may call the recursive MinLoc function that you wrote in part (a).Solution
// if we make structure as global so program will very simple and easy no need pass structure as arguments to function ..etc #include using namespace std; struct node{ int info; struct node *next; }; struct node *head = NULL; void addnode(){ struct node *temp; temp = new(struct node); cout<<\"Enter node : \"; cin>>temp->info; temp->next = NULL; if(head == NULL){ head = temp; } else{ temp->next = head; head = temp; } } void MinLoc() { static struct node * min = head, *head1 = head; head1 = head1->next; if(min->info > head1->info) { min = head1; MinLoc(); } cout<<\"min ; \"