Answer:
see explaination
Explanation:
#include <iostream>
#include <string>
using namespace std;
class LinkedList{
class Node{
public :
int data;
Node* next;
Node(int data){
this->data = data;
next = NULL;
}
};
public :
Node *head;
LinkedList(){
this->head = NULL;
}
void insert(int d){
Node* new_node = new Node(d);
new_node->next = head;
head = new_node;
}
// sort the list with selection sort algorithm.
// Pick the smallest element in the unsorted array and place in the first element in the unsorted.
void sort_list(){
if (head == NULL){
return;
}
Node* current = head;
while (current->next != NULL){
Node* min_node = current;
Node* traverse = current->next;
while(traverse != NULL){
if(traverse->data < min_node->data){
min_node = traverse;
}
traverse = traverse->next;
}
int temp = current->data;
current->data = min_node->data;
min_node->data = temp;
current = current->next;
}
}
void print_list(){
Node* current = head;
while(current !=NULL){
cout<<current->data<<" ";
current = current->next;
}
cout<<"\n";
}
};
int main(){
LinkedList ll;
for(int i=0;i<10;i++){
ll.insert(i);
}
ll.print_list();
cout<<"*******************************************\n";
ll.sort_list();
ll.print_list();
cout<<"*******************************************\n";
}
Flowchart - diagram created by different shapes to show flow of data
algorithm - step by step procedure to solve the problem
A flowchart is a representation of an algorithm
Answer:
0 540 100 200 350 400 550 600 750
Explanation:
hope this helped
Answer:
Determine if the software or service is authorized
Explanation:
:)
Doubly linked chain
When a linked chain contains nodes that reference both the next node and the previous node, it is called a doubly linked chain. This type of chain is often used in data structures because it provides a way to easily traverse the data in both directions. However, because each node must reference both the next node and the previous node, doubly linked chains require more memory than singly linked chains.
Learn more here:
brainly.com/question/13100699
#SPJ4