Untitled

 avatar
unknown
plain_text
2 years ago
280 B
6
Indexable
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++;
}
Editor is loading...