print(
node*head) {
18 while(current != NULL) {
19cout << current->data <<
" ";
20current = current->link;
26node*createlist(
intn) {
29 for(
inti = 0; i < n; i++) {
33temp =
new node(num);
47voidmy_selection_sort_linked_list(
node*&head) {
76 while(current != NULL)
80 if(current->data < min->data)
93min->link = current->link;
94current->link = previous;
96current = previous->link;
103previous->link = current->link;
106current = previous->link;
111temp->link = current;
112previous->link = current->link;
115current = previous->link;
120previous = previous->link;
121current = current->link;
160cout <<
"enter the no. of nodes : ";
165head = createlist(n);
166cout <<
"original list is : ";
168my_selection_sort_linked_list(head);
169cout <<
"sorted list is : ";
struct node { int data; int height; struct node *left; struct node *right;} node
for std::queue
int main()
Main function.
struct list * link
pointer to nodes
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4