第21078题 单选题
以下C++代码实现了循环队列的哪种操作?
class CircularQueue {
 int* arr;
 int front, rear, size;
public:
 CircularQueue(int k) {
  size = k;
  arr = new int[k];
  front = rear = -1;
 }
 bool enQueue(int value) {
  if (isFull()) return false;
  if (isEmpty()) front = 0;
  rear = (rear + 1) % size;
  arr[rear] = value;
  return true;
 }
};
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析