We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/**
最后一个元素的下标应该是 ( q-rear-1+q-capacity ) % q-capacity?
The text was updated successfully, but these errors were encountered:
这里没有任何问题。
修改操作,如queue_push(), queue_pop(),需要考虑取模的问题 只读操作,如queue_front(), queue_back(),不需要,直接访问就是了
Sorry, something went wrong.
rear不会出现为0的情形吗
No branches or pull requests
/**
*/
queue_elem_t queue_back(const queue_t *q) {
return q->elems[q->rear - 1];
}
最后一个元素的下标应该是 ( q-rear-1+q-capacity ) % q-capacity?
The text was updated successfully, but these errors were encountered: