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

Function dequeue

12. Queue/QueueUsingStacks.cpp:64–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 count++;
63}
64void dequeue()
65{
66 if((top1==-1) && (top2==-1))
67{
68 printf("\nQueue is empty");
69}
70else
71{
72 for(int i=0;i<count;i++)
73 {
74 int element = pop1();
75 push2(element);
76 }
77int b= pop2();
78printf("\nThe dequeued element is %d", b);
79printf("\n");
80count--;
81for(int i=0;i<count;i++)
82{
83 int a = pop2();
84 push1(a);
85}
86}}
87void display()
88{
89 for(int i=0;i<=top1;i++)

Callers 1

mainFunction · 0.70

Calls 4

pop1Function · 0.85
push2Function · 0.85
pop2Function · 0.85
push1Function · 0.85

Tested by

no test coverage detected