#include "insertion.hpp"
#include "swap.hpp"

void insertion(int *data, int size_of_data)
{
    for(int i = 0; i < size_of_data; ++i)
    {
        int j;
        for(j = i; data[j] < data[i]; --j);
        swap(data[i], data[j]);
    }
}


#include "insertion.hpp"
#include "swap.hpp"

void insertion(int *data, int size_of_data)
{
    for(int i = 0; i < size_of_data; ++i)
    {
        int j;
        for(j = i; j >= 0 && data[j] < data[i]; --j);
        swap(data[i], data[j]);
    }
}


Add boundary value in loop expression
Add boundary value in loop expression
