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

Поділитися
Вставка
  • Опубліковано 11 жов 2024

КОМЕНТАРІ • 22

  • @swastikchatterjee5838
    @swastikchatterjee5838 Рік тому +22

    On the way of becoming the Errichto of India!

  • @sanamdeepsingh7914
    @sanamdeepsingh7914 Рік тому +6

    This type of content is rare......creator generally make videos on repetitive topics which can be found in n number of different videos.....but 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.

  • @i_am_wiz
    @i_am_wiz 6 місяців тому +1

    Please continue this greedy series

  • @harshpandey4190
    @harshpandey4190 Місяць тому +1

    Triology Innovations OA 2023 question - change permutation

  • @daveloperkrishana7559
    @daveloperkrishana7559 Рік тому +4

    I think this question came in ICPC 2022 amritapuri preliminary round

  • @rajmittal5394
    @rajmittal5394 Рік тому +2

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

  • @harshit.17
    @harshit.17 Рік тому

    Great content as always Vivek ! Please keep them coming

  • @Snapper_Raj
    @Snapper_Raj 10 місяців тому

    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

  • @zero-w1b
    @zero-w1b Рік тому

    great content sir

  • @KyleSpamHere
    @KyleSpamHere Рік тому

    Love your content as always ❤❤

  • @subinaypanda1042
    @subinaypanda1042 Рік тому

    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.

    • @vivekgupta3484
      @vivekgupta3484  Рік тому

      no no… we can do it without graph too… just to have one concept that can solve it all.

  • @jeeadvanced1230
    @jeeadvanced1230 Рік тому

    Nice concept ❤❤❤

  • @tonysingh5334
    @tonysingh5334 Рік тому +2

    where is episode 2 ?

    • @vivekgupta3484
      @vivekgupta3484  Рік тому

      i had to make it private as there was some issue with the audio. will rerecord it 🥲

  • @bruteforce2434
    @bruteforce2434 Рік тому

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

    • @vivekgupta3484
      @vivekgupta3484  Рік тому +1

      i had to make it private as there was some issue with the audio. will rerecord it 🥲

  • @md.shariarkabir7350
    @md.shariarkabir7350 Рік тому

    Why ep2 not showing?

    • @vivekgupta3484
      @vivekgupta3484  Рік тому +4

      i had to make it private as there was some issue with the audio. will rerecord it 🥲

    • @md.shariarkabir7350
      @md.shariarkabir7350 Рік тому

      @@vivekgupta3484 thank u