Pancake Sorting | LeetCode 969 | C++, Java, Python

preview_player
Показать описание

**** Best Books For Data Structures & Algorithms for Interviews:**********
*****************************************************************************

August LeetCoding Challenge | Problem 29 | Pancake Sorting | 29 August,
Facebook Coding Interview question,
google coding interview question,
leetcode,
Pancake Sorting,
Pancake Sorting c++,
Pancake Sorting Java,
Pancake Sorting python,
Pancake Sorting solution,
969. Pancake Sorting,

#CodingInterview #LeetCode #AugustCodingChallenge #Google #Amazon #pancakeSorting #sorting
Рекомендации по теме
Комментарии
Автор

res = []
for x in range(len(A), 1, -1):
i = A.index(x)
res.extend([i + 1, x])
A = A[:i:-1] + A[:i]
return res

siddharthsingh
Автор

Hi sir! You support for my progress is immense. And so I took the membership of this channel ☺️. But sorry I can't continue over months . Consider it as a small gift!. I saw there is resume review for members, How to avail it ?. Also I'm waiting for the trees and DP bucket list. Thank you so much.

ayyappahemanth
Автор

Great sir !!
Sir, this code will give the non-empty array in case of sorted array also. But it should give the empty array. How to fix it ?

mukultaneja
Автор

why i <= idx/2 instead of i<=idx? we need to flip the elements till idx ?

naidusunny
Автор

Hii i really liked your video...i daily checkout your approach for daily code...i have a question can you help me...how efficiently to take input from space seperated integer in a array in c++...like in python we have arr=list(map(int, input().split()))

adityaagrahari
visit shbcf.ru