正在加载图片...
mid=(low+high)/2; if(a[mid].key==k) return (2) else if((3) low=mid+1; else (4) } (5) } 2.以下函数为链队列的入队操作,x为要入队的结点的数据域的值,front、rear分别是链 队列的队头、队尾指针。 struct node ElemType data; struct node next; }; struct node front,rear; void InQueue(ElemType x) struct node p; p=(struct node¥)(1) p->data=x; p->next=NULL; (2) rear=(3) } 1366dahfd" w-h+h1nvJU-- return (2) • , else if«3) low=mid+l; else (4) 5 (5) • , 2. 操作 ,x 要人 front 、rear 是链 队列的队头、队尾指针。 struct node { ElemType data; struct node 铃next; struct node 铃front 铃rear; void InQueue(ElemType x) struct node 祷p; p= (struct node (1) • , 一>data=x; 一>next= NULL; (2) • , rear= (3) 1366
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有