198 viewsData Structures
0
0 Comments

What will be the correct option ?

0

Some data is missing like Stack, temp1, temp2 are stacks.

loop1: pop each element from stack Stack and push in to stack temp1

loop2: pop each element from temp1 and push it in to temp2

loop3: pop each element from temp1 and push it in to Stack

so automatically data will be reversed

You are viewing 1 out of 0 answers, click here to view all answers.