-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAlgorithm.h
More file actions
45 lines (43 loc) · 1.45 KB
/
Algorithm.h
File metadata and controls
45 lines (43 loc) · 1.45 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
#pragma once
#include <iostream>
#include <cstdio>
#include <list>
#include <vector>
#include <queue>
#include <map>
#include <set>
using namespace std;
class CAlgorithm
{
public:
CAlgorithm();
~CAlgorithm();
vector<int> CAlgorithm::bfs(map<int, vector<int> > link, int top);
vector<string> CAlgorithm::Split(const string src, string separate_character);
vector<int> CAlgorithm::dfs(map<int, vector<int>> link, int top);
int CAlgorithm::hungary(int u);
void CAlgorithm::runHungary();
int CAlgorithm::index_force(char * s, char * t, int pos);
void CAlgorithm::get_next(char * s, int * next);
int CAlgorithm::KMP(char * s, char * t, int pos);
int CAlgorithm::Horspool(char * source, char * pattern);
void CAlgorithm::Bc(char * s, int * Bc_table);
void CAlgorithm::get_suffix(char * s, int * suffix);
void CAlgorithm::Gs(char *s, int * Gs_table);
int CAlgorithm::BM(char * s, char * t);
};
void quickSort(int arr[]);
void BubbleSort(int arr[]);
void InsertSort(int arr[]);
void ShellSort(int arr[]);
void SelectSort(int arr[]);
void HeapSort(int arr[]);
void mergeSort(int array[]);
void countSort(int arr[]);
void bucketSort(int arr[], int size);
void radixSort(int arr[]);
int SequenceSearch(int a[], int value, int n);
int BinarySearch1(int a[], int value, int n);
int BinarySearch2(int a[], int value, int low, int high);
int InsertionSearch(int a[], int value, int low, int high);
int FibonacciSearch(int *a, int n, int key);