MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/stl/stack n queue.cpp:9–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#define endl '\n'
8
9int main(){
10 cin.tie(0)->sync_with_stdio(0);
11 stack<int> st;
12 st.push(1);
13 st.push(3);
14 st.push(3);
15 st.push(3);
16 st.emplace(12);
17
18 cout << st.top() << endl;
19
20 st.pop();
21
22 cout<<st.top()<<endl;
23
24 cout<<st.size()<<endl;
25
26 cout<<st.empty()<<endl;
27
28 //swaping stack
29 stack<int> st1;
30 st1.swap(st);
31
32 return 0;
33}

Callers

nothing calls this directly

Calls 5

topMethod · 0.80
pushMethod · 0.45
popMethod · 0.45
sizeMethod · 0.45
swapMethod · 0.45

Tested by

no test coverage detected