EP3: Winning Greedy Ideas | Minimum number of swaps to target | English

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

-------------------------------------------------------------------------------------------------------------

If you are a beginner, here are some resources to start with :

If you are looking to train in a commado like regime for acing DSA (with DEV and System Design covered for placement too), do checkout :

Рекомендации по теме
Комментарии
Автор

On the way of becoming the Errichto of India!

swastikchatterjee
Автор

This type of content is generally make videos on repetitive topics which can be found in n number of different the ideas that you solve are complex and you make them easy to understand at the same time. Your channel is a gem for cp content.

sanamdeepsingh
Автор

Triology Innovations OA 2023 question - change permutation

harshpandey
Автор

I think this question came in ICPC 2022 amritapuri preliminary round

daveloperkrishana
Автор

Mai ek aisa question abhi dekha tha sayad. Ek permuatation ko dusre mai convert covert karma tha. Min number of swaps pucha tha

rajmittal
Автор

Another much similar thing uses this idea is min adjacent swaps needed.
number of inversion in corrected in array according to second one as sorted

Snapper_Raj
Автор

Great content as always Vivek ! Please keep them coming

harshit.
Автор

Should we have to use graph? I mean I have solution for the first 2 problems in this video without any graph concept.
The idea is pretty simple. I check for the elements of a and b which are not at right place. I check whether that right place is at before or after the current place. If before then I increment one variable 'pos' else i increment one variable 'neg'. Thus I get the no min no. of swaps is the max of pos and neg.

subinaypanda
Автор

Where is episode 2? I can't find it!

bruteforce