直接插入排序代码,第1张

直接插入排序代码,第2张

#include
  using namespace std;
  #define NUM 10
  void DirectInsert(int *list,int n)
  {
  int i;
  int j;
  int x;
  for (i=1;i=0;j--)
  {
  if (list[j]>x)
  {
  list[j+1] = list[j];
  }
  else
  break;
  }
  list[j+1] = x;
  }
  }
  void Print(int *list,int n)
  {
  int i;
  for (i=0;i

DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
白度搜_经验知识百科全书 » 直接插入排序代码

0条评论

发表评论

提供最优质的资源集合

立即查看 了解详情