⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 3.28.txt

📁 数据结构实验 如下: Status Fibonacci(int k, int m, int &f) /* 求k阶斐波那契序列的第m项的值f */
💻 TXT
字号:
Status InitCLQueue(CLQueue &rear)
{ 
    rear=(LNode *)malloc(sizeof(LNode));
    if(!rear) return OVERFLOW;
    else rear->next=rear;
    return OK;
}

Status EnCLQueue(CLQueue &rear, ElemType x)
{ 
    LNode *p;
    p=(LNode *)malloc(sizeof(LNode));
    if(!p) return ERROR;
    p->data=x;
    p->next=rear->next;
    rear->next=p;
    rear=p;
    return OK;
}

Status DeCLQueue(CLQueue &rear, ElemType &x)
{    
    LNode * p;
    if(rear->next==rear) return ERROR;
    p=rear->next->next;
    rear->next->next=p->next;
    x=p->data;
    free(p);
    return OK;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -