No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
[CODE]#ifndef ARRAYLIST_H #define ARRAYLIST_H #include <iostream> using namespace std; template <class ItemType> class ArrayList { public: enum SortOrder {ASCENDING, DESCENDING}; private: typedef ItemType* pItemType; typedef pItemType* ppItemType; ppItemType items; size_t count; // Finds the index of the next item in order. size_t FindNextIndex(const int start, const SortOrder order) const; // … |
|
[CODE]#ifndef SORT_LIB_H #define SORT_LIB_H template <typename T> class Sort { private: static int FindNextMinIndex(T arr[], const int start, const int length); static void Swap(T arr[], const int index1, const int index2); public: static void SelectionSort(T arr[], const int length); }; template <typename T> int Sort<T>::FindNextMinIndex(T arr[], const int start, const … |