forked from yzhu798/CodingInterviewsNotes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (35 loc) · 1.1 KB
/
main.cpp
File metadata and controls
40 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <iostream>
#include <algorithm>
#include <string>
#include "sort.h"
#include "search.h"
using namespace std;
int main(int argc, char *argv[])
{
int result =1;
for(int i=0;i<1;i++){
Sort sort(100,0,100);
Search sh;
sort.BubbleSort(sort.arr);
sort.printf(sort.arr);
// cout<< sh.binarySearch(sort.arr,0,100,49)<<endl;
cout<< sh.InsertionSearch(sort.arr,0,100,50)<<endl;
cout<< sh.InsertionSearch(sort.arr,0,100,49)<<endl;
// sort.stdSort(sort.arr);
// sort.insertionSort(sort.arr);
// sort.printf(sort.arr);
// sort.BubbleSort(sort.arr);
// sort.countingSort(sort.arr);
// sort.selectionSort(sort.arr);
// sort.quickSort(sort.arr);
// sort.radixSort(sort.arr);
// sort.mergeSort(sort.arr);
// sort.printf(sort.arr);
if(sort.check_result(sort.arr,sort.arr2) ==0){
result =false;
break;
}
}
cout << "result :"<<result<<endl;
return 0;
}