#include<iostream>
#include<cstdlib>
#include <ctime>
using namespace std;
void InsertionSort (int a[],int len)
{
if (a==NULL||len<=1)
{
return ;
}
for(int j=1;j<len;j++)
{
int temp=a[j];
int p=j;
while(p>0&&a[p-1]>temp)
{
a[p]=a[p-1];
p--;
#include<cstdlib>
#include <ctime>
using namespace std;
void InsertionSort (int a[],int len)
{
if (a==NULL||len<=1)
{
return ;
}
for(int j=1;j<len;j++)
{
int temp=a[j];
int p=j;
while(p>0&&a[p-1]>temp)
{
a[p]=a[p-1];
p--;