Pancake Sorting | Leetcode August Challenge Day 29 | Leetcode 969

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

Quick Links
Why example in question is not intuitive
1:40 Understanding the trick
2:35 Reducing the problem statement
4:12 Coding it up

Solution

Time: O(n2)
Space : O(n)

#coding #sorting #programming #software #learn #with #me
Рекомендации по теме
Комментарии
Автор

It made it extremely simple to understand

AnuPriya-ekiy
Автор

Expected answer is [4, 2, 4, 3]
Your answer is [3, 4, 2, 3, 1, 2]
I am not sure I understand this. Why is [3, 4, 2, 3, 1, 2] also right?

theolivebella
join shbcf.ru