Count Inversions in an array | Q16 | Love Babbar DSA sheet | Amazon | Microsoft | Flipkart | Adobe

Sdílet
Vložit
  • čas přidán 4. 11. 2020
  • #coding #competitiveprogramming #interviewquestions #dsaseries
    In this video I have explained the problem Inversion Count.
    Love Babbar DSA sheet : drive.google.com/file/d/1FMdN...
    Hope you like it. If have any doubt then just comment down below.
    LIKE | SHARE | SUBSCRIBE

Komentáře • 50

  • @utkarshsaxena7445
    @utkarshsaxena7445 Před 2 lety +13

    Some people are saying that he is pasting the solution of striver !! Well Striver himself said that he would be explaining solutions from GFG in his count inversion video and bro samajh ke dikha dena . Explanations in Hindi are really a boon for us 😍 Love you broo keep going 😎

  • @uk1523
    @uk1523 Před 3 lety +3

    Thanks brother I am stucked in this problem from three days 👍

  • @tushar5359
    @tushar5359 Před rokem +1

    Honestly, striver k smjhya smjh nhi aaya tha but ye wala aa gya 🫥 thnks btw.

  • @ankitasinha9912
    @ankitasinha9912 Před 2 lety +1

    Hi ,Just a quick query why have you taken mid +1in line no 44 inv+=merge1(a,temp,left,'mid+1',right)?

  • @Sakshi-ez1ly
    @Sakshi-ez1ly Před 3 lety +3

    Very good explanation,thanks a lot!

  • @vinayakrastogi890
    @vinayakrastogi890 Před 3 lety +5

    everything is good but ek dry run code k saath bhi karo aise thodi cheeze unclear reh jaati hai

  • @Anonymous-tk1mg
    @Anonymous-tk1mg Před 3 lety +4

    loop start with ( i=l and i

  • @mohitbhriguvanshi6328
    @mohitbhriguvanshi6328 Před 3 lety +2

    aap ko kya phale hi guess main yeh optimal solution aah gya tha ki nhi..?

  • @gauravbhai3910
    @gauravbhai3910 Před rokem

    why have you taken another array can this done using only original array.

  • @SakshamVedi
    @SakshamVedi Před 2 lety

    bhai tu hit hian

  • @sainathpatil1858
    @sainathpatil1858 Před 3 lety +1

    nice explanation bro

  • @user-kn4zc2gt3r
    @user-kn4zc2gt3r Před měsícem

    Good effort but due to speed ,i could not undrstand

  • @ravikantchauhan2106
    @ravikantchauhan2106 Před rokem

    as soon as I just gonna to quite the video bacause of it's masterpiece english😁, he started in hindi. phir bhi confusion me ni aaya😅

  • @anmolkumarshah
    @anmolkumarshah Před 3 lety +16

    you are doing great work but please .. teach in Hindi only... its humble request

    • @rockerboy4184
      @rockerboy4184 Před 3 lety +1

      In interview, questions will be asked in English not in Hindi

    • @rohan4941
      @rohan4941 Před 2 lety +1

      @@rockerboy4184 yesa English bolenge toh reject hona hi hai bro

  • @nitishsharma2194
    @nitishsharma2194 Před rokem

    bhai tere andar talent hai mai manta hu but agar kisi topic ko explain kar rha hai to usko koshish kar ki easy way me explain kar sake taki bigner level ke log bhi ache se understand kar sake

  • @manasdubey3763
    @manasdubey3763 Před 3 lety +4

    nice one keep it up and one thing if you speak in English try to be natural

  • @namansharma1448
    @namansharma1448 Před 3 lety +1

    why did u put j = mid
    when u said j = starting point of 2nd array
    j should be mid=1;

    • @maheshchaudhary4931
      @maheshchaudhary4931 Před 2 lety +1

      in function call he has passed mid as mid+1 ,that's why he has taken j=mid and not mid+1.

  • @Mk-gf1wh
    @Mk-gf1wh Před 3 lety +1

    Bro, plz solve the problems in terms of O(n)

  • @Yash_Parashar
    @Yash_Parashar Před 3 lety +1

    Why in brute force i

    • @rahulagrawal3611
      @rahulagrawal3611 Před 3 lety +1

      Because for n-1th (last ) element there is no further element to compare. As you would have noticed j starts from i+1. Hence loop has to run only untill second last and not the last.

    • @Yash_Parashar
      @Yash_Parashar Před 3 lety

      @@rahulagrawal3611 thank you 🙏🙏for helping

    • @Yash_Parashar
      @Yash_Parashar Před 3 lety

      @@rahulagrawal3611 I have little bit doubt in using the nested for loop ,do you have any recommendations to perfect it.

    • @rahulagrawal3611
      @rahulagrawal3611 Před 3 lety +1

      @@Yash_Parashar Do you mean further optimizing and solving without nested for loop? If yes, then I would say I don't have much suggestion on it. Rather we should focus on optimal solution because most interviewers are only interested in getting optimal solution.

    • @Yash_Parashar
      @Yash_Parashar Před 3 lety

      @@rahulagrawal3611 ok , but I am little bit confused in nested for loop for brute force approach,any hint or suggestion for this???

  • @kanharajput5443
    @kanharajput5443 Před 3 lety +1

    Can anyone tell me how many problems he/she is solving in a day?

  • @satyammishra7413
    @satyammishra7413 Před 2 lety +1

    bhai tum bohot acha padhe rhe ho pr yeh angrezi ke chakkar mei na pado, hindi mei hi thik smjha paa rhe ho tum

  • @agamgupta-ed9ye
    @agamgupta-ed9ye Před rokem

    can u explain for this example
    2,5,1,3,4
    as per explanation i tried
    2,5. 1,3,4 ->till this we get 0 inversion
    after this i am confused

  • @sanketdawange
    @sanketdawange Před rokem

    need to improve

  • @deekshithpranav1619
    @deekshithpranav1619 Před 3 lety +2

    Bro please teach more in English. I am not able to completely get you when you speak in Hindi. It becomes difficult.

  • @arvindmenaria9106
    @arvindmenaria9106 Před 2 lety

    What mid-i doing here

  • @adityajain1205
    @adityajain1205 Před 2 lety +1

    striver ka solution full copy paste..lol

  • @omrajgure4553
    @omrajgure4553 Před 2 lety +3

    its sort...not short....its super annoying when you say it short.

  • @akshatvashishtha1
    @akshatvashishtha1 Před 2 lety +1

    very bad explanation