You're given the pointer to the head node of aordered linked list, an integer to add tothe list. Write a function that inserts a number in the the listpreserving its order. If the head pointer containsa null pointer that indicates an empty list.
Function insertNode has the followingparameters:
- head: a SinglyLinkedListNode pointer to thehead of the list
- data: an integer value to insert as data inyour new node
Function prototype:
- SinglyLinkedListNode* insertNode(SinglyLinkedListNode* head,int data)