Data Structures :: Searching & Sorting - Discussion
Home > Data Structures > Searching & Sorting > MCQs Questions Discussion
39 / 69
Let S and S1 be two stacks and Q be the additional Queue then what is the result putted:
while (S not empty)
{
Q.insert(pop(S));
}
while(Q not empty)
{
push(S1,Q.delete());
} ?
while (S not empty)
{
Q.insert(pop(S));
}
while(Q not empty)
{
push(S1,Q.delete());
} ?
AS and S1 are same
BNone of them
CS1 is reverse of S
DS and S1 will be different
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!