Which operation is most essential to the process of pancake sort?

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 data
 
Answer: A
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.
 

Tìm kiếm

Back
Top