MCPcopy Create free account
hub / github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA / push2

Function push2

12. Queue/QueueUsingStacks.cpp:38–51  ·  view source on GitHub ↗

pushing the data into the stack2.

Source from the content-addressed store, hash-verified

36}
37// pushing the data into the stack2.
38void push2(int x)
39{
40// Condition to check whether the stack2 is full or not
41if(top2==N-1)
42{
43 printf("\nStack is full..");
44}
45else
46{
47 top2++; // incrementing the value of top2.
48 stack2[top2]=x; // assigning the 'x' value to the Stack2
49
50}
51}
52// Removing the elements from the Stack2
53int pop2()
54{

Callers 1

dequeueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected