Davinder Singh
Davinder Singh - 4 years ago in Data Structure

Which one of the following permutations can be obtained the output using stack assuming that the input is the sequence 1,2,3,4,5 in that order ?

[A] 3,4,5,1,2
[B] 3,4,5,2,1
[C] 1,5,2,3,4
[D] 5,4,3,1,2
Loading...

Overall Stats

Attempted 427
Correct 46
Incorrect 152
Viewed 229

Answers

Guest
Guest
shengqiushuang
shengqiushuang - 1 year ago

I agree with the answer is 54321

Nitesh Patel
Nitesh Patel - 1 year ago

Some one who have posted this answer has misguided us

Suthar Bhanwar Mlm
Suthar Bhanwar Mlm - 1 year ago

http://www.emis.de/journals/EJC/Volume_13/PDF/v13i1r68.pdf

Suthar Bhanwar Mlm
Suthar Bhanwar Mlm - 1 year ago

52314 is the correct ans. for using permutations rules

Lalit Kumar
Lalit Kumar - 2 years ago

this is correct answer first push 5,4,3 in the stack and then pop them ns we get 3,4,5 and then push 2,1 and we get 1,2 so answer is 3,4,5,1,2

Ajaysing Rajput
Ajaysing Rajput - 2 years ago

yup R8 54321

Ayush Rathi
Ayush Rathi - 2 years ago

i think there is something wrong

Ayush Rathi
Ayush Rathi - 2 years ago

how it can be?

Zaheer Abbas
Zaheer Abbas - 2 years ago

correct answer is 5,4,3,2,1 because stact is a LIFO device

Ashani Imalsha
Ashani Imalsha - 1 week ago

Ashani Imalsha from Colombo, Sri Lanka is saying 3,4,5,2,1 is correct answer

José Dutra Medeiros
José Dutra Medeiros - 1 month ago

José Dutra Medeiros from Ottawa, Canada is saying 5,4,3,1,2 is correct answer

Mital Patel
Mital Patel - 1 month ago

Mital Patel from Ahmedabad, India is saying 5,4,3,1,2 is correct answer

مفلح بسام الكوفحي
مفلح بسام الكوفحي - 2 months ago

مفلح بسام الكوفحي is saying 3,4,5,2,1 is correct answer

DASHARATH SINGH
DASHARATH SINGH - 7 months ago

DASHARATH SINGH from Pune, India is saying 5,4,3,1,2 is correct answer

Related Questions

Davinder Singh
Davinder Singh - 4 years ago in Data Structure
Linked list are not suitable data structure of which one of the following problems ?
  • [A] Insertion sort
  • [B] Binary search
  • [C] Radix sort
  • [D] Polynomial manipulation
  • Meesala Mohan
Davinder Singh
Davinder Singh - 4 years ago in Data Structure
Merge sort uses ?
  • [A] Divide and conquer strategy
  • [B] Backtracking approach
  • [C] Heuristic search
  • [D] Greedy approach
Davinder Singh
Davinder Singh - 4 years ago in Data Structure
The postfix expression for * + a b - c d is?
  • [A] ab + cd - *
  • [B] ab cd + - *
  • [C] ab + cd * -
  • [D] ab + - cd *
  • Muhammad Aown
  • Zuhaib Dar