Last active
March 19, 2017 00:12
-
-
Save niklio/5d689d20dc137b047d130c2e3f72c22b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T> | |
void SortAlg<T>::insertionSort(typename vector<T>::iterator s, | |
typename vector<T>::iterator e) { | |
typename vector<T>::iterator i, j; | |
for (i = s + 1; i < e; i++) for (j = i; j > s && *(j - 1) > *j; j--) iter_swap(j, j - 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment