Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
280 B
3
Indexable
Never
int qx[100000];
int qy[100000];
int front = -1;
int rear = -1;
bool isEmpty(){
	return front == -1;
}
void push(int x, int y){
	if (front == -1) front = 0;
	rear++;
	qx[rear] = x;
	qy[rear] = y;
}
void pop(){
	if (front >= rear) front = rear = -1;
	else front++;
}