#include using namespace std; class Node { public: const int element; Node* next; }; class List { public: List(initializer_list l); int size() { return size_; } void sort(); void print(); private: Node * head{}; int size_{}; }; List::List(initializer_list l) { for (auto ele : l) { head = new Node{ele, head}; size_++; } } void List::print() { Node * temp = head; cout << "( "; while (temp != nullptr) { cout << temp -> element << " "; temp = temp -> next; } cout << ")"; } void List::sort() { /* insert your code here */ } int main() { List l{8, 2, 4, 1, 5}; cout << "Before sort "; l.print(); cout << endl; l.sort(); cout << "After sort "; l.print(); cout << endl; }