+ 1
Sorting a linked list which is in a class c++
I want to sort a single linked list which is already there in a class using c++ https://code.sololearn.com/cZCsi2DPMCpy/?ref=app
5 Respostas
0
I want to do an insertion sorting for a linked list
- 1
void BookList::insert(BookNode *node)
{
BookNode* tmp;
tmp= new BookNode;
tmp->bk = node->bk;
tmp-> next = head;
head = tmp;
}
I'm just adding new nodes to the list I want to sort them according to their number which is there in object bk