MCPcopy Create free account
hub / github.com/Lakhankumawat/LearnCPP / push

Method push

S-Stack/StacksUsingQueue.cpp:24–36  ·  view source on GitHub ↗

push expensive

Source from the content-addressed store, hash-verified

22 }
23 //push expensive
24 void push(int x){
25 q2.push(x);
26 N++;
27
28 while(!q1.empty()){
29 q2.push(q1.front());
30 q1.pop();
31 }
32
33 queue<int> temp = q1;
34 q1 = q2;
35 q2 = temp;
36 }
37
38 //pop easy
39 void pop(){

Callers 15

topoMethod · 0.45
TopologicalBfsMethod · 0.45
huffmancodeFunction · 0.45
min_computationFunction · 0.45
kLargestMethod · 0.45
costFunction · 0.45
bfsMethod · 0.45
primsMethod · 0.45
bipartiteFunction · 0.45
bfsFunction · 0.45
bfsFunction · 0.45
mainFunction · 0.45

Calls 2

emptyMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected