solved pancake sort