1.

Which operation is most essential to the process of pancake sort?(a) Flip the given data(b) Find the largest of given data(c) Finding the least of given data(d) Inserting something into the given dataI had been asked this question in exam.I'd like to ask this question from Pancake Sort in portion Sorting of Data Structures & Algorithms II

Answer»

The CORRECT answer is (a) Flip the GIVEN data

Best explanation: When we use pancake sort, we sort the ARRAY to find the largest, and then flip the array at that point to bring that value to the bottom of the pancake stack. The SIZE of the array that we are dealing with is then reduced and the process continues. Flip operation is the most important function in the pancake sort technique.



Discussion

No Comment Found

Related InterviewSolutions