Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ enqueue
Method
enqueue
CPP/QUEUE/QueueUsingStack.cpp:8–12 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
6
7
8
void enqueue(int x){
9
10
s1.push(x);
11
12
}
13
int dequeue(){
14
while(!s1.empty()){
15
s2.push(s1.top());
Callers
1
main
Function · 0.45
Calls
1
push
Method · 0.45
Tested by
no test coverage detected