File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,12 @@ int main()
8484 system (CLEAR);
8585 std::cout << " Sort changed to: " << Utils::getSortType (sortType) << std::endl;
8686 }
87+ else {
88+ // Go to the first sorting algorithm
89+ sortType = 0 ;
90+ system (CLEAR);
91+ std::cout << " Sort changed to " << Utils::getSortType (sortType) << std::endl;
92+ }
8793 break ;
8894
8995 // Change sort type (decrease)
@@ -93,6 +99,16 @@ int main()
9399 system (CLEAR);
94100 std::cout << " Sort changed to: " << Utils::getSortType (sortType) << std::endl;
95101 }
102+ else {
103+ // Go to the last sorting algorithm
104+ while (Utils::hasNextSortType (sortType))
105+ {
106+ sortType++;
107+ }
108+
109+ system (CLEAR);
110+ std::cout << " Sort changed to: " << Utils::getSortType (sortType) << std::endl;
111+ }
96112 break ;
97113
98114 // Change number of elements
You can’t perform that action at this time.
0 commit comments