-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlgorithms.h
More file actions
70 lines (57 loc) · 1.42 KB
/
Copy pathAlgorithms.h
File metadata and controls
70 lines (57 loc) · 1.42 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef ALGORITHMS_H
#define ALGORITHMS_H
#include <ncurses.h>
#include <vector>
class Algorithms {
public:
static int delay;
void static PrintGraph(std::vector<int> arr, int swap1, int swap2);
};
class QuickSort {
public:
int Partition(std::vector<int> &arr, int start, int end);
void Sort(std::vector<int> &arr, int start, int end);
};
class InsertionSort {
public:
void Sort(std::vector<int> &arr, int n);
};
class BubbleSort {
public:
void Sort(std::vector<int> &arr, int n);
};
class SelectionSort {
public:
void Sort(std::vector<int> &arr, int n);
};
class DualPivotQuickSort {
public:
int Partition(std::vector<int> &arr, int low, int high, int *lp);
void Sort(std::vector<int> &arr, int low, int high);
};
class MergeSort {
public:
void merge(std::vector<int> &array, int const left, int const mid, int const right);
void Sort(std::vector<int> &array, int const begin, int const end);
};
class BingoSort {
public:
void MaxMin(std::vector<int> &vec, int n, int &bingo, int &nextBingo);
void Sort(std::vector<int> &vec, int n);
};
class PancakeSort {
public:
void flip(std::vector<int> &arr, int i);
int findMax(std::vector<int> &arr, int n);
void Sort(std::vector<int> &arr, int n);
};
class CombSort {
public:
int getNextGap(int gap);
void Sort(std::vector<int> &a, int n);
};
class GnomeSort {
public:
void Sort(std::vector<int> &arr, int n);
};
#endif