Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void insertionSort(Array<Book>& ob)
- {
- for (int i = 0; i < ob.length(); ++i)
- for (int j = i; j > 0 && ob[j - 1] < ob[j]; --j)
- {
- Book temp = ob[j - 1];
- ob[j - 1] = ob[j];
- ob[j] = temp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement