A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://TheAlgorithms.github.io/C-Plus-Plus/d9/dcc/selectionsortlinkedlist_8cpp_source.html below:

TheAlgorithms/C++: operations_on_datastructures/selectionsortlinkedlist.cpp Source File

16void

print(

node

*head) {

18 while

(current != NULL) {

19

cout << current->data <<

" "

;

20

current = current->link;

26node

*createlist(

int

n) {

29 for

(

int

i = 0; i < n; i++) {

33

temp =

new node

(num);

47void

my_selection_sort_linked_list(

node

*&head) {

76 while

(current != NULL)

80 if

(current->data < min->data)

93

min->link = current->link;

94

current->link = previous;

96

current = previous->link;

103

previous->link = current->link;

106

current = previous->link;

111

temp->link = current;

112

previous->link = current->link;

115

current = previous->link;

120

previous = previous->link;

121

current = current->link;

160

cout <<

"enter the no. of nodes : "

;

165

head = createlist(n);

166

cout <<

"original list is : "

;

168

my_selection_sort_linked_list(head);

169

cout <<

"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