26 lines
		
	
	
		
			932 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			932 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef BASIC_SORTS_HPP
 | |
| #define BASIC_SORTS_HPP
 | |
| 
 | |
| #include <string>
 | |
| #include <vector>
 | |
| 
 | |
| // Different basic sorting algorithm implementations
 | |
| namespace basic_sorts
 | |
| {
 | |
|     // Performs Insertion Sort on given word list (vector of strings)
 | |
|     void InsertionSort(std::vector<std::string> *newWordList);
 | |
| 
 | |
|     // Performs Merge Sort on given word list (vector of strings)
 | |
|     void MergeSort(std::vector<std::string> *newWordList);
 | |
|     void _MergeSort(std::vector<std::string> *newWordList, int p, int r);
 | |
|     void _Merge(std::vector<std::string> *newWordList, int p, int q, int r);
 | |
| 
 | |
|     // Performs Heap Sort on given word list (vector of strings)
 | |
|     void HeapSort(std::vector<std::string> *newWordList);
 | |
|     void _HeapSort(std::vector<std::string> *newWordList);
 | |
|     void _Heapify(std::vector<std::string> *newWordList, int i, int heapSize);
 | |
|     int _HEAPSORT_LEFT(int i);
 | |
|     int _HEAPSORT_RIGHT(int i);
 | |
| }
 | |
| 
 | |
| #endif |