正在加载图片...
六、算法设计题(每小题6分,共12分) 1.评分标准:按注释酌情给分。 int Max(LinkNode *f) { if(f==NULL)return 0; /11分 if(f->link==NULL)return f->data; /12分 int temp=Max(f->>link); 114分 if(f->data>temp)return f->data; /15分 else return temp; /16分 2.评分标准:按注释酌情给分。 bool DelCQueue(CyelicQueue&.Q,ElemType&.x) if(Q.length==0)return false; /11分 x=Q.elem[(Q.rear-Q.length+M)%M]; 1/4分 Q.length--; /5分 return true; /16分 74六、算法设计题 (每小题 6分 ,共 12分) 1.评分标准:按注释酌情给分。 int Max(LinkNode*f) if(f==NULL) return 0; if<f一>link= =NULL) return f一> data ; int temp=Max(f一>link); if(f一>data> temp) return f一>data; else return temp; 刀1分 /2分 刀4分 /l5分 //6分 } 2.评分标准:按注释酌情给分。 bool DelCQueue(CyclicQueue乙Q, ElemType乙x) { if(Q. length二=0)return false; x= Q, elem[ ( Q. rear一Q. length-I- M) 0 o M] Q. length一一; return true; //1分 刀4分 // 分 //6分 74
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有