![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
王道8.4综合应用
文豪必上岸
这个作者很懒,什么都没留下…
展开
-
8.4选择排序综合应用5
#include<stdio.h>#include<stdlib.h>#include<math.h>bool If(int A[],int n){ int i,j; if(A[0]>A[1] || A[0]>A[2]) return false; for(i=n/2-1;i>0;i--){ for(j=2*i;j<=n-1;j=j*2){ if(A[j+1]<A[j] && j+1<=n-.原创 2021-10-26 17:50:07 · 51 阅读 · 0 评论 -
8.4选择排序综合应用4
#include<stdio.h>#include<stdlib.h>typedef struct LNode{ int data; struct LNode *next;}LNode,*LinkList;void Insert(LinkList &L){ LNode *s; int x; L=(LinkList)malloc(sizeof(LNode)); //头指针 L->next=NULL; scanf("%d",&x); whi.原创 2021-10-26 16:05:54 · 52 阅读 · 0 评论 -
8.4选择排序2
#include<stdio.h>#include<stdlib.h>#include<math.h>void jj(int A[],int i,int num){ int temp=A[i],temp2; for(int j=2*i;j<=num-1;j=j*2){ if(A[j+1]<A[j] &&j<=num-2){ j++; } if(A[j]<temp){ temp2=A[j]; .原创 2021-10-24 20:51:18 · 52 阅读 · 0 评论