feat: Initial commit
This commit is contained in:
26
TemiEsame/prodCartOrd.c
Normal file
26
TemiEsame/prodCartOrd.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void insertionSort(int *v1, int d1) {
|
||||
int t = 0;
|
||||
|
||||
for (int i = 1; i < d1; i++) {
|
||||
t = v1[i];
|
||||
|
||||
int j = i -1;
|
||||
|
||||
while (j >= 0 && v1[j]>t) {
|
||||
v1[j+1] = v1[j];
|
||||
j--;
|
||||
}
|
||||
|
||||
v1[j+1] = t;
|
||||
}
|
||||
}
|
||||
|
||||
void prodCartOrd(int *v1, int d1, int *v2, int d2) {
|
||||
insertionSort(v1, d1);
|
||||
insertionSort(v2, d2);
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user