Update selection sort example
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*#############################################################################
|
||||
## Author: Shaun Reed ##
|
||||
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
|
||||
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
|
||||
## About: An example implementation of selection sort using a custom library ##
|
||||
## ##
|
||||
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
|
||||
@@ -12,23 +12,12 @@
|
||||
|
||||
#define ARRAY_LENGTH 10
|
||||
|
||||
/** RandomArray
|
||||
* Returns an array automatically filled with random values
|
||||
* Sizes array to match length setting ARRAY_LENGTH
|
||||
* @return A pointer to a static array
|
||||
*/
|
||||
int * RandomArray();
|
||||
#include <vector>
|
||||
|
||||
/** SelectionSort
|
||||
* Sorts an array of integers in ascending order
|
||||
* @param arr The array to sort
|
||||
*/
|
||||
void SelectionSort(int arr[]);
|
||||
|
||||
/** PrintArray
|
||||
* Prints an array based on the define ARRAY_LENGTH
|
||||
* @param arr The array to print
|
||||
*/
|
||||
void PrintArray(int arr[]);
|
||||
void SelectionSort(std::vector<int> &arr);
|
||||
|
||||
#endif // LIB_SELECT_H
|
||||
|
||||
Reference in New Issue
Block a user