【正确答案】(1)数据结构
Struct Node;
typedef struct Node*PNode;
struct Node{
KeyType key;
DataType value;
PNode link;
}
typedef struct Node*LinkDictionary;
(2)算法
PNode seqSearch(LinkDictionary ldic,KeyType key){
/*在字典中顺序检索关键码为key的元素*/
PNode p;
if(ldic==NULL)return NULL;
p=ldic->link;/*p指向头结点所指的结点*/
while(p!=NULL&&p->key!=key)p=p->link;
return p;
}
【答案解析】