Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include"LinkedList.h"
- using namespace std;
- int main(){
- LinkedList* list = new LinkedList;
- list->unshift(27); list->unshift(12); list->unshift(56);
- list->push(87); list->push(35); list->unshift(25);
- cout << "list=" << *list << endl;
- LinkedList* clist = list->copy(1, 5);
- cout << "clist=" << *clist << endl;
- LinkedList* slist = list->splice(2, 4);
- cout << "slist=" << *slist << endl;
- cout << "remained list=" << *list << endl;
- cout << "find 25=" << clist->find(56) << endl;
- cout << "find 100=" << clist->find(100) << endl;
- clist->sort();
- cout << "sorted clist=" << *clist << endl;
- delete list;
- delete clist;
- delete slist;
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment