added the code for Pancake sorting with comments