Leetcode - Pancake Sorting (Python)

preview_player
Показать описание
August 2020 Leetcode Challenge
Leetcode - Pancake Sorting
Рекомендации по теме
Комментарии
Автор

Good video, I was very curious to see how this was implemented and I really didn't understand the text explanation. Thanks for making it.

theycallmejohn
Автор

I've been trying to understand the problem, NOT TO SOLVE, but to Understand for fu*king two days. And now i understand it, ty

DilmanzZ
Автор

i totally forgot about the two pointer approach for reversing an array!

thanks tim

janmichaelaustria
Автор

the problem explanation made 0 sense lmao

RandomShowerThoughts
Автор

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
welcome to shbcf.ru