Add example for cpp/algorithms/sorting/merge

This commit is contained in:
2021-05-24 12:11:33 -04:00
parent fa4407e74a
commit b2bdd62fb2
5 changed files with 138 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
/*#############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: An example implementation of merge sort using a custom library ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
###############################################################################
*/
#ifndef LIB_MERGE_H
#define LIB_MERGE_H
#define ARRAY_LENGTH 10
#include <vector>
void MergeSort(std::vector<int> &array, size_t lhs, size_t rhs);
void Merge(std::vector<int> &array, size_t lhs, size_t mid, size_t rhs);
#endif // LIB_MERGE_H