Notizen
big sorting

Inhalt der Notizen (8)
Seite 1
big sorting

Seite 2
insertion sort
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
void insertionSort(int n, int *a) {
int temp,i,j,k;
for(j=1;j<n;j++)
{
temp=a[j];
i=j-1;
while(i>=0&&a[i]>temp)
{
a[i+1]=a[i];
i--;
for(k=0;k<n;k++)
cout<<a[k]<<" ";
cout<<endl;
}
a[i+1]=temp;
}
for(k=0;k<n;k++)
cout<<a[k]<<" ";
}
int main(void) {
int n;
cin>>n;
int a[n], i;
for(i = 0; i < n; i++) {
cin>>a[i];
}
insertionSort(n,a);
return 0;
}

Seite 3
quick sort
Seite 4
Counting Sort 2
Seite 5
closest number
Seite 6
closest number
Closest Number (application/pdf)
Seite 7
Missing number
Missingnumber (application/pdf)
Seite 8
sherlock and array
Informationen
- Beschreibung
- Computer Science Notiz am big sorting , erstellt von Gunjan Kumar am 03/05/2018.
- Erstellt von
- Gunjan Kumar
- Aufrufe
- 0
- Bewertung