id int64 1 2.26k | language stringclasses 7
values | category stringclasses 3
values | difficulty stringclasses 2
values | task_description stringclasses 132
values | code stringlengths 68 753 | explanation stringclasses 449
values |
|---|---|---|---|---|---|---|
1,101 | Java | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | import java.util.*;
public class Main {
public static void main(String[] args) {
Queue<Double> coll = new LinkedList<>();
coll.add(29.45);
coll.add(99.1);
coll.add(53.94);
coll.add(42.96);
System.out.println(coll.poll());
System.out.println(coll.poll(... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,102 | Java | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | import java.util.*;
public class Main {
public static void main(String[] args) {
Queue<Double> buf = new LinkedList<>();
buf.add(17.09);
buf.add(38.75);
buf.add(74.82);
buf.add(92.54);
System.out.println(buf.poll());
System.out.println(buf.poll());
... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,103 | Java | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | import java.util.*;
public class Main {
public static void main(String[] args) {
Queue<Double> coll = new LinkedList<>();
coll.add(95.15);
coll.add(9.47);
coll.add(25.74);
coll.add(54.74);
System.out.println(coll.poll());
System.out.println(coll.poll(... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,104 | Java | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | import java.util.*;
public class Main {
public static void main(String[] args) {
Queue<Double> container = new LinkedList<>();
container.add(28.15);
container.add(27.61);
container.add(25.8);
container.add(65.65);
System.out.println(container.poll());
... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,105 | Java | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | import java.util.*;
public class Main {
public static void main(String[] args) {
Queue<Double> buf = new LinkedList<>();
buf.add(57.28);
System.out.println(buf.poll());
buf.add(27.19);
buf.add(18.7);
}
} | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,106 | Java | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | import java.util.*;
public class Main {
public static void main(String[] args) {
Queue<Double> box_ = new LinkedList<>();
box_.add(2.71);
System.out.println(box_.poll());
box_.add(4.66);
box_.add(36.51);
}
} | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,107 | Java | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | import java.util.*;
public class Main {
public static void main(String[] args) {
Queue<Double> coll = new LinkedList<>();
coll.add(84.59);
System.out.println(coll.poll());
coll.add(6.8);
coll.add(93.94);
}
} | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,108 | Java | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | import java.util.*;
public class Main {
public static void main(String[] args) {
Queue<Double> buf = new LinkedList<>();
buf.add(89.81);
System.out.println(buf.poll());
buf.add(95.38);
buf.add(44.6);
}
} | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,109 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue buf = { .front = 0, .rear = 0 };
enqueue(&buf, 99);
enqueue(&b... | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,110 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue s = { .front = 0, .rear = 0 };
enqueue(&s, 30);
enqueue(&s, 81... | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,111 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue container = { .front = 0, .rear = 0 };
enqueue(&container, 84);
... | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,112 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue coll = { .front = 0, .rear = 0 };
enqueue(&coll, 5);
enqueue(&... | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,113 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue box_ = { .front = 0, .rear = 0 };
enqueue(&box_, 75);
enqueue(... | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,114 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue s = { .front = 0, .rear = 0 };
enqueue(&s, 8);
enqueue(&s, 92)... | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,115 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue coll = { .front = 0, .rear = 0 };
enqueue(&coll, 46);
enqueue(... | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,116 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue s = { .front = 0, .rear = 0 };
enqueue(&s, 45);
enqueue(&s, 14... | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,117 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue q = { .front = 0, .rear = 0 };
enqueue(&q, 66);
enqueue(&q, 10... | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,118 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue buf = { .front = 0, .rear = 0 };
enqueue(&buf, 88);
enqueue(&b... | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,119 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue s = { .front = 0, .rear = 0 };
enqueue(&s, 4);
enqueue(&s, 42)... | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,120 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue coll = { .front = 0, .rear = 0 };
enqueue(&coll, 48);
enqueue(... | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,121 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue buf = { .front = 0, .rear = 0 };
enqueue(&buf, 6);
printf("%g\... | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,122 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue q = { .front = 0, .rear = 0 };
enqueue(&q, 14);
printf("%g\n",... | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,123 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue container = { .front = 0, .rear = 0 };
enqueue(&container, 92);
... | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,124 | C | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | #include <stdio.h>
#define MAX 100
typedef struct { int items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, int value) { q->items[q->rear++] = value; }
int dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue container = { .front = 0, .rear = 0 };
enqueue(&container, 92);
... | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,125 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue container = { .front = 0, .rear = 0 };
enqueue(&container... | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,126 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue q = { .front = 0, .rear = 0 };
enqueue(&q, 95.56);
en... | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,127 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue container = { .front = 0, .rear = 0 };
enqueue(&container... | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,128 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue container = { .front = 0, .rear = 0 };
enqueue(&container... | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,129 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue buf = { .front = 0, .rear = 0 };
enqueue(&buf, 27.65);
... | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,130 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue buf = { .front = 0, .rear = 0 };
enqueue(&buf, 23.86);
... | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,131 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue box_ = { .front = 0, .rear = 0 };
enqueue(&box_, 36.83);
... | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,132 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue container = { .front = 0, .rear = 0 };
enqueue(&container... | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,133 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue container = { .front = 0, .rear = 0 };
enqueue(&container... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,134 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue buf = { .front = 0, .rear = 0 };
enqueue(&buf, 32.07);
... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,135 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue s = { .front = 0, .rear = 0 };
enqueue(&s, 90.09);
en... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,136 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue box_ = { .front = 0, .rear = 0 };
enqueue(&box_, 74.54);
... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,137 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue s = { .front = 0, .rear = 0 };
enqueue(&s, 51.97);
pr... | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,138 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue s = { .front = 0, .rear = 0 };
enqueue(&s, 40.83);
pr... | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,139 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue buf = { .front = 0, .rear = 0 };
enqueue(&buf, 59.56);
... | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,140 | C | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | #include <stdio.h>
#define MAX 100
typedef struct { double items[MAX]; int front, rear; } Queue;
void enqueue(Queue* q, double value) { q->items[q->rear++] = value; }
double dequeue(Queue* q) { return q->items[q->front++]; }
int main(void) {
Queue coll = { .front = 0, .rear = 0 };
enqueue(&coll, 92.15);
... | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,141 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> coll;
coll.push(56);
coll.push(38);
coll.push(97);
std::cout << coll.front() << std::endl; coll.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,142 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> coll;
coll.push(18);
coll.push(94);
coll.push(24);
std::cout << coll.front() << std::endl; coll.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,143 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> container;
container.push(66);
container.push(11);
container.push(20);
std::cout << container.front() << std::endl; container.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,144 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> container;
container.push(76);
container.push(48);
container.push(87);
std::cout << container.front() << std::endl; container.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,145 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> box_;
box_.push(49);
box_.push(42);
std::cout << box_.front() << std::endl; box_.pop();
box_.push(23);
std::cout << box_.front() << std::endl; box_.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,146 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> coll;
coll.push(76);
coll.push(36);
std::cout << coll.front() << std::endl; coll.pop();
coll.push(13);
std::cout << coll.front() << std::endl; coll.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,147 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> buf;
buf.push(64);
buf.push(44);
std::cout << buf.front() << std::endl; buf.pop();
buf.push(73);
std::cout << buf.front() << std::endl; buf.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,148 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> container;
container.push(75);
container.push(66);
std::cout << container.front() << std::endl; container.pop();
container.push(37);
std::cout << container.front() << std::endl; container.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,149 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> box_;
box_.push(41);
box_.push(97);
box_.push(23);
box_.push(19);
std::cout << box_.front() << std::endl; box_.pop();
std::cout << box_.front() << std::endl; box_.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,150 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> coll;
coll.push(27);
coll.push(56);
coll.push(67);
coll.push(36);
std::cout << coll.front() << std::endl; coll.pop();
std::cout << coll.front() << std::endl; coll.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,151 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> buf;
buf.push(13);
buf.push(45);
buf.push(37);
buf.push(22);
std::cout << buf.front() << std::endl; buf.pop();
std::cout << buf.front() << std::endl; buf.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,152 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<int> buf;
buf.push(63);
buf.push(57);
buf.push(29);
buf.push(22);
std::cout << buf.front() << std::endl; buf.pop();
std::cout << buf.front() << std::endl; buf.pop();
return 0;
} | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,153 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | #include <iostream>
#include <queue>
int main() {
std::queue<int> container;
container.push(97);
std::cout << container.front() << std::endl; container.pop();
container.push(30);
container.push(86);
return 0;
} | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,154 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | #include <iostream>
#include <queue>
int main() {
std::queue<int> buf;
buf.push(19);
std::cout << buf.front() << std::endl; buf.pop();
buf.push(27);
buf.push(71);
return 0;
} | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,155 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | #include <iostream>
#include <queue>
int main() {
std::queue<int> container;
container.push(97);
std::cout << container.front() << std::endl; container.pop();
container.push(4);
container.push(77);
return 0;
} | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,156 | C++ | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | #include <iostream>
#include <queue>
int main() {
std::queue<int> q;
q.push(70);
std::cout << q.front() << std::endl; q.pop();
q.push(25);
q.push(1);
return 0;
} | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,157 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> box_;
box_.push(83.42);
box_.push(3.55);
box_.push(21.11);
std::cout << box_.front() << std::endl; box_.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,158 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> container;
container.push(43.22);
container.push(45.04);
container.push(13.49);
std::cout << container.front() << std::endl; container.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,159 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> q;
q.push(71.91);
q.push(92.0);
q.push(12.87);
std::cout << q.front() << std::endl; q.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,160 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> box_;
box_.push(27.04);
box_.push(86.59);
box_.push(99.31);
std::cout << box_.front() << std::endl; box_.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,161 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> q;
q.push(96.88);
q.push(80.56);
std::cout << q.front() << std::endl; q.pop();
q.push(23.02);
std::cout << q.front() << std::endl; q.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,162 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> s;
s.push(51.2);
s.push(28.33);
std::cout << s.front() << std::endl; s.pop();
s.push(51.77);
std::cout << s.front() << std::endl; s.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,163 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> coll;
coll.push(69.11);
coll.push(89.33);
std::cout << coll.front() << std::endl; coll.pop();
coll.push(10.94);
std::cout << coll.front() << std::endl; coll.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,164 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> container;
container.push(32.44);
container.push(84.3);
std::cout << container.front() << std::endl; container.pop();
container.push(87.88);
std::cout << container.front() << std::endl; container.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,165 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> coll;
coll.push(63.1);
coll.push(25.35);
coll.push(59.05);
coll.push(87.34);
std::cout << coll.front() << std::endl; coll.pop();
std::cout << coll.front() << std::endl; coll.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,166 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> box_;
box_.push(15.99);
box_.push(81.57);
box_.push(73.62);
box_.push(28.98);
std::cout << box_.front() << std::endl; box_.pop();
std::cout << box_.front() << std::endl; box_.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,167 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> container;
container.push(85.86);
container.push(75.2);
container.push(1.32);
container.push(7.66);
std::cout << container.front() << std::endl; container.pop();
std::cout << container.front() << std::endl; container.p... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,168 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | #include <iostream>
#include <queue>
int main() {
std::queue<double> s;
s.push(4.84);
s.push(69.11);
s.push(61.72);
s.push(63.47);
std::cout << s.front() << std::endl; s.pop();
std::cout << s.front() << std::endl; s.pop();
return 0;
} | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,169 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | #include <iostream>
#include <queue>
int main() {
std::queue<double> container;
container.push(66.04);
std::cout << container.front() << std::endl; container.pop();
container.push(30.71);
container.push(23.96);
return 0;
} | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,170 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | #include <iostream>
#include <queue>
int main() {
std::queue<double> buf;
buf.push(67.13);
std::cout << buf.front() << std::endl; buf.pop();
buf.push(63.37);
buf.push(60.19);
return 0;
} | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,171 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | #include <iostream>
#include <queue>
int main() {
std::queue<double> container;
container.push(48.61);
std::cout << container.front() << std::endl; container.pop();
container.push(12.12);
container.push(88.21);
return 0;
} | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,172 | C++ | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, pop, push, push. | #include <iostream>
#include <queue>
int main() {
std::queue<double> buf;
buf.push(42.54);
std::cout << buf.front() << std::endl; buf.pop();
buf.push(25.49);
buf.push(43.06);
return 0;
} | Queue with float elements, ops=['push', 'pop', 'push', 'push']. |
1,173 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | use std::collections::VecDeque;
fn main() {
let mut s: VecDeque<i32> = VecDeque::new();
s.push_back(60);
s.push_back(41);
s.push_back(85);
println!("{:?}", s.pop_front());
} | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,174 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | use std::collections::VecDeque;
fn main() {
let mut buf: VecDeque<i32> = VecDeque::new();
buf.push_back(90);
buf.push_back(51);
buf.push_back(91);
println!("{:?}", buf.pop_front());
} | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,175 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | use std::collections::VecDeque;
fn main() {
let mut box_: VecDeque<i32> = VecDeque::new();
box_.push_back(63);
box_.push_back(77);
box_.push_back(53);
println!("{:?}", box_.pop_front());
} | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,176 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, pop. | use std::collections::VecDeque;
fn main() {
let mut s: VecDeque<i32> = VecDeque::new();
s.push_back(4);
s.push_back(38);
s.push_back(35);
println!("{:?}", s.pop_front());
} | Queue with int elements, ops=['push', 'push', 'push', 'pop']. |
1,177 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | use std::collections::VecDeque;
fn main() {
let mut s: VecDeque<i32> = VecDeque::new();
s.push_back(53);
s.push_back(8);
println!("{:?}", s.pop_front());
s.push_back(99);
println!("{:?}", s.pop_front());
} | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,178 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | use std::collections::VecDeque;
fn main() {
let mut buf: VecDeque<i32> = VecDeque::new();
buf.push_back(87);
buf.push_back(41);
println!("{:?}", buf.pop_front());
buf.push_back(51);
println!("{:?}", buf.pop_front());
} | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,179 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | use std::collections::VecDeque;
fn main() {
let mut box_: VecDeque<i32> = VecDeque::new();
box_.push_back(52);
box_.push_back(34);
println!("{:?}", box_.pop_front());
box_.push_back(35);
println!("{:?}", box_.pop_front());
} | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,180 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, pop, push, pop. | use std::collections::VecDeque;
fn main() {
let mut coll: VecDeque<i32> = VecDeque::new();
coll.push_back(29);
coll.push_back(44);
println!("{:?}", coll.pop_front());
coll.push_back(6);
println!("{:?}", coll.pop_front());
} | Queue with int elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,181 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | use std::collections::VecDeque;
fn main() {
let mut box_: VecDeque<i32> = VecDeque::new();
box_.push_back(53);
box_.push_back(29);
box_.push_back(74);
box_.push_back(22);
println!("{:?}", box_.pop_front());
println!("{:?}", box_.pop_front());
} | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,182 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | use std::collections::VecDeque;
fn main() {
let mut coll: VecDeque<i32> = VecDeque::new();
coll.push_back(15);
coll.push_back(79);
coll.push_back(79);
coll.push_back(43);
println!("{:?}", coll.pop_front());
println!("{:?}", coll.pop_front());
} | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,183 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | use std::collections::VecDeque;
fn main() {
let mut container: VecDeque<i32> = VecDeque::new();
container.push_back(3);
container.push_back(93);
container.push_back(3);
container.push_back(49);
println!("{:?}", container.pop_front());
println!("{:?}", container.pop_front());
} | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,184 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, push, push, push, pop, pop. | use std::collections::VecDeque;
fn main() {
let mut coll: VecDeque<i32> = VecDeque::new();
coll.push_back(43);
coll.push_back(46);
coll.push_back(99);
coll.push_back(99);
println!("{:?}", coll.pop_front());
println!("{:?}", coll.pop_front());
} | Queue with int elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,185 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | use std::collections::VecDeque;
fn main() {
let mut coll: VecDeque<i32> = VecDeque::new();
coll.push_back(7);
println!("{:?}", coll.pop_front());
coll.push_back(27);
coll.push_back(47);
} | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,186 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | use std::collections::VecDeque;
fn main() {
let mut container: VecDeque<i32> = VecDeque::new();
container.push_back(26);
println!("{:?}", container.pop_front());
container.push_back(69);
container.push_back(51);
} | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,187 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | use std::collections::VecDeque;
fn main() {
let mut coll: VecDeque<i32> = VecDeque::new();
coll.push_back(30);
println!("{:?}", coll.pop_front());
coll.push_back(21);
coll.push_back(48);
} | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,188 | Rust | Data Structures | intermediate | Implement a queue of ints and run the operation sequence: push, pop, push, push. | use std::collections::VecDeque;
fn main() {
let mut buf: VecDeque<i32> = VecDeque::new();
buf.push_back(53);
println!("{:?}", buf.pop_front());
buf.push_back(71);
buf.push_back(94);
} | Queue with int elements, ops=['push', 'pop', 'push', 'push']. |
1,189 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | use std::collections::VecDeque;
fn main() {
let mut s: VecDeque<f64> = VecDeque::new();
s.push_back(94.06);
s.push_back(4.57);
s.push_back(2.98);
println!("{:?}", s.pop_front());
} | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,190 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | use std::collections::VecDeque;
fn main() {
let mut q: VecDeque<f64> = VecDeque::new();
q.push_back(50.65);
q.push_back(79.34);
q.push_back(5.19);
println!("{:?}", q.pop_front());
} | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,191 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | use std::collections::VecDeque;
fn main() {
let mut q: VecDeque<f64> = VecDeque::new();
q.push_back(23.77);
q.push_back(77.47);
q.push_back(25.48);
println!("{:?}", q.pop_front());
} | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,192 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, pop. | use std::collections::VecDeque;
fn main() {
let mut q: VecDeque<f64> = VecDeque::new();
q.push_back(81.49);
q.push_back(38.41);
q.push_back(40.67);
println!("{:?}", q.pop_front());
} | Queue with float elements, ops=['push', 'push', 'push', 'pop']. |
1,193 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | use std::collections::VecDeque;
fn main() {
let mut buf: VecDeque<f64> = VecDeque::new();
buf.push_back(86.34);
buf.push_back(8.58);
println!("{:?}", buf.pop_front());
buf.push_back(70.65);
println!("{:?}", buf.pop_front());
} | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,194 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | use std::collections::VecDeque;
fn main() {
let mut q: VecDeque<f64> = VecDeque::new();
q.push_back(2.46);
q.push_back(83.19);
println!("{:?}", q.pop_front());
q.push_back(16.03);
println!("{:?}", q.pop_front());
} | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,195 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | use std::collections::VecDeque;
fn main() {
let mut box_: VecDeque<f64> = VecDeque::new();
box_.push_back(20.23);
box_.push_back(60.96);
println!("{:?}", box_.pop_front());
box_.push_back(33.05);
println!("{:?}", box_.pop_front());
} | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,196 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, pop, push, pop. | use std::collections::VecDeque;
fn main() {
let mut q: VecDeque<f64> = VecDeque::new();
q.push_back(30.91);
q.push_back(46.43);
println!("{:?}", q.pop_front());
q.push_back(96.96);
println!("{:?}", q.pop_front());
} | Queue with float elements, ops=['push', 'push', 'pop', 'push', 'pop']. |
1,197 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | use std::collections::VecDeque;
fn main() {
let mut box_: VecDeque<f64> = VecDeque::new();
box_.push_back(29.83);
box_.push_back(10.21);
box_.push_back(96.72);
box_.push_back(56.54);
println!("{:?}", box_.pop_front());
println!("{:?}", box_.pop_front());
} | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,198 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | use std::collections::VecDeque;
fn main() {
let mut container: VecDeque<f64> = VecDeque::new();
container.push_back(51.15);
container.push_back(38.86);
container.push_back(99.32);
container.push_back(73.03);
println!("{:?}", container.pop_front());
println!("{:?}", container.pop_front()... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,199 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | use std::collections::VecDeque;
fn main() {
let mut coll: VecDeque<f64> = VecDeque::new();
coll.push_back(11.72);
coll.push_back(23.18);
coll.push_back(97.54);
coll.push_back(40.34);
println!("{:?}", coll.pop_front());
println!("{:?}", coll.pop_front());
} | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
1,200 | Rust | Data Structures | intermediate | Implement a queue of floats and run the operation sequence: push, push, push, push, pop, pop. | use std::collections::VecDeque;
fn main() {
let mut container: VecDeque<f64> = VecDeque::new();
container.push_back(11.79);
container.push_back(31.75);
container.push_back(15.23);
container.push_back(63.36);
println!("{:?}", container.pop_front());
println!("{:?}", container.pop_front()... | Queue with float elements, ops=['push', 'push', 'push', 'push', 'pop', 'pop']. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.