
(1). 假如队列未满,现有变量data需要入队,请写出表达式;
if( (tail+1)%SEQLEN != head )
{
    seqn[tail] = data;
    tail = (tail+1)%SEQLEN;
}(2). 假如队列未空,现在需要从队列取一个元素并赋值给变量data,请写出表达式;
if( head != tail )
{
    data = seqn[tail];
    head = (head+1)%SEQLEN;
}(3) 请写出队列为空的判断条件:
if(head == tail)
{
}(3) 请写出队列满的判断条件:
if( (tail+1) % SEQLEN == head )
{
}(4) 请写出清空队列的表达式
while(head != tail)
{
    (tail+1) % SEQLEN == head
}(6)请写出计算队列中元素个数的表达式:
(tail - head + SEQLEN) % SEQLEN(7)队列最多可以存放几个元素:
SEQLEN - 1----------------------------------------------------------------------------------------------------------------------------


插入到 prev 和 next 中间
new->next = next;
prev->next =new;删除 prev 和 next中间那个
new = prev->next;
prev->next = new->next;
free(new);
new = NULL;插入到队尾
new->next = NULL;
head->next = new;
head = head->next;删除
prev = entry->next;
entry->next = NULL;
free(entry);
entry = NULL;判断是否为空
head->next = head->prev;













![[设计模式Java实现附plantuml源码~行为型] 对象状态及其转换——状态模式](https://img-blog.csdnimg.cn/direct/38f6ea44761e4ea4988da9dbb6b53775.png)




