Complete the insert() function
Insert a node that stores the "data" passed in the list while still maintaining the sorted order.
The traversal and if condition are already done for you.
- Edit List.cpp. You will edit List::insert(int data).
- Implement the pointer logic in the section of code labeled "PUT CODE HERE". For example, if the linked list is:
m_head -> 1 -> 4 -> 5 -> 7 -> 8 -> NULL
Lets say you wanted to insert 6. current would stop at the node that has 5. It is your task to get a new Node with the value of 6 inserted between 5 and 7.