Minimize the Heights | Love Babbar DSA Sheet Q9 | Arrays

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

КОМЕНТАРІ • 77

  • @SaifKhan-lq1sp
    @SaifKhan-lq1sp 2 роки тому +2

    Bahut jayada hi clear.
    Very well done.

  • @AlokKumar-ld9qr
    @AlokKumar-ld9qr 2 роки тому +3

    Thanks sir.....I am struggling with the question from two days but After Watching your video....this Question is looking so easy.

  • @MilindGupta
    @MilindGupta 3 роки тому +11

    ❤️❤️ keep going bhai this was confusing pblm for me

  • @rishabhgupta9846
    @rishabhgupta9846 2 роки тому +2

    Thanks bhai,aapki video dekh kar hi mujhe clear hua. Make more videos-- your new subscriber

  • @abhishektandon2312
    @abhishektandon2312 2 роки тому +3

    Great Explanation Sir, After watching a lot of videos now I get the exact intuition from your's
    Thank you so much 🙏🙏

  • @Divyansh-x7n
    @Divyansh-x7n Рік тому +1

    best explanation of this question on youtbe

  • @hrithiksinghrtk6158
    @hrithiksinghrtk6158 2 роки тому +1

    i saw all the u tube videos for this question solution at last i found urs ....really very good explanation🤩

  • @gowthambhat1498
    @gowthambhat1498 3 місяці тому +1

    you deserve more subscribers, excellent explanation.

  • @prasads7530
    @prasads7530 2 роки тому +3

    Thank you Sir, it helped me a lot!! after referring multiple explanations for this question, finally i came to this video and now its clear to me

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

    Sir you made this question too easy very well explained👍👍✌

  • @aasifali9139
    @aasifali9139 2 роки тому +2

    Thanks for this video sir. Very well explained.

  • @showsshorts4696
    @showsshorts4696 2 роки тому +2

    lovely explanation by you sir thanks alot

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

    Absolutely amazing explaination sir!!!!!
    thankyou so much sir

  • @dhirajkumarsahu999
    @dhirajkumarsahu999 2 роки тому

    Thank you so much Bhai, this was the best solution for this question. Keep making such videos. You have earned my subscription

  • @wtfun5465
    @wtfun5465 2 роки тому +1

    best explanation than other viedeos

  • @levi-lb6dp
    @levi-lb6dp 2 роки тому +1

    thanks bro for precise and simple solution

  • @ankukushwaha1098
    @ankukushwaha1098 2 роки тому +2

    Thanks a lot sir... I didn't understand this question clearly even after watching tech skeleton video but i did after watching yours... Great explanation ❣

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

    Nice explanation brother.

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

    great explanation thanks a lot

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

    best solution ever

  • @tusharnain6652
    @tusharnain6652 2 роки тому +1

    Only video that helps, tysm

  • @aryantiwari2784
    @aryantiwari2784 2 роки тому +1

    wow simplest explanation ever

  • @Shivamkumar-ue4hl
    @Shivamkumar-ue4hl 2 роки тому +2

    Thanks a lot bro after wasting my lots of time on other videos finally got this question understood well by you ! 😁😁

    • @Shivamkumar-ue4hl
      @Shivamkumar-ue4hl Рік тому

      @@aadarshkeerti000 try krte rho mainly dry run karo jada...

  • @lalit-singh-bisht
    @lalit-singh-bisht Рік тому

    best explanation guruji

  • @rohitumadi9544
    @rohitumadi9544 2 роки тому +1

    superb explanation

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

    Bhai bohot sahi explain kiya hai

  • @prateektripathi100
    @prateektripathi100 2 роки тому +2

    Great Explanation....

  • @azimuddin6921
    @azimuddin6921 2 роки тому +1

    nice bhai, Thank you

  • @05_hemantpanchariya92
    @05_hemantpanchariya92 2 роки тому +1

    thank you prakash bhai

  • @gauravnagpal172
    @gauravnagpal172 2 роки тому +1

    Perfectly explained
    💯

  • @ajit287
    @ajit287 3 роки тому +2

    Very well explained...

  • @mannpatel7441
    @mannpatel7441 2 роки тому +1

    great work..

  • @amansingh.h716
    @amansingh.h716 Рік тому

    in question they mentioned we have to perform k operation in each element,
    so why u don't perform k operation in your first diff operation

  • @travelnlearn
    @travelnlearn 2 роки тому +5

    Thank You Sir for this awesome and genuine content.
    This q looked difficult to me before but now its a piece of cake for me.
    All thanks to you Sir, May GBU with lots of love long life success happiness and enjoyment
    Thanks a lot again

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

    Easiest solution explanation i have watched so far. You deserve more subscribers

  • @adnanshaikh6141
    @adnanshaikh6141 2 роки тому +1

    A simple and great explanation👌

  • @PrinceKumar-rt7qc
    @PrinceKumar-rt7qc 2 роки тому +1

    well explained

  • @dipteshdeore5207
    @dipteshdeore5207 2 роки тому +1

    great explanation 🤩

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

    Best explanation

  • @lokanathpatasahani897
    @lokanathpatasahani897 2 роки тому +1

    Thank you sir

  • @ramyabl6753
    @ramyabl6753 3 роки тому +1

    super bhaiya keep going

  • @sunidhibhardwaj4529
    @sunidhibhardwaj4529 5 місяців тому +1

    nice explanation

  • @tanvitripathi5743
    @tanvitripathi5743 2 роки тому +2

    Keep going ❤❤

  • @user-gq1ij
    @user-gq1ij 2 роки тому +2

    I am glad I found this one at last, no one else explained this well

  • @sumitchakraborty9451
    @sumitchakraborty9451 2 роки тому +1

    clean and clear

  • @blockkedd
    @blockkedd 8 місяців тому +1

    can anyone explain the line no 52 ????

  • @omkarsawant9267
    @omkarsawant9267 11 місяців тому

    C language code and code breakdown will help better understand.
    #include
    #include
    // Qsort Time Complexity is O(nlogn) where n is no of elements in an array and Loop Interates is O(n)
    // Space complexity is O(logn) due to recursive call of sorting alogithm
    // Helper function to swap two integers
    void swap (int* a, int* b)
    {
    int temp = *a;
    *a = *b;
    *b = temp;
    }
    // Helper Function to compare two integers for Qsort
    int compare (const void *a, const void *b)
    {
    return (*(int *)a - *(int *)b);
    }
    // Function to minimize the max difference between heights
    int minimizeMaxDiff(int arr[], int n, int k)
    {
    if (n big)
    swap(&small,&big);
    // Traverse middle Elements
    for (int i; i=small || add

  • @arhamali4041
    @arhamali4041 3 роки тому +1

    keep going bhaiya

  • @lalit-singh-bisht
    @lalit-singh-bisht Рік тому

    sir ye kuch alag level ka question tha...toh inka logic find krne mein toh dhoti khul jaaegi

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

    max - min -2k ni kar skte kya

  • @growmore1672
    @growmore1672 2 роки тому +2

    Int diff = arr[n-1] - arr[0]
    Yeh isliye kiya to handle a edge case of (arr[n-1] + k ) - (arr[0] + k )
    Yeh bhi ek minimum difference ka candidate hai

  • @abdurrahman-gn6hy
    @abdurrahman-gn6hy 3 роки тому +2

    thanks ur r good

  • @shalabhbhatiya5659
    @shalabhbhatiya5659 2 роки тому +2

    bro concept samaj nhi aaya kya karru
    ???

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

    is this question available on leetcode , if yes provide no.

  • @MyAnish22
    @MyAnish22 2 роки тому +1

    Not all test cases are getting cleared - using C++
    What is wrong in my code? Can someone help?
    class Solution {
    public:
    int getMinDiff(int arr[], int n, int k) {
    int mini = INT_MAX;
    int maxi = INT_MIN;
    for (int i = 0; i < n; i++){
    if(arr[i]

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

      use long long instead of int

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

    thek hai

  • @M10-r8q7h
    @M10-r8q7h 2 роки тому +1

    not running for test casses
    1 5 8 10
    if k=2

  • @pratyushtripathi1728
    @pratyushtripathi1728 2 місяці тому +1

  • @Premkumar-zk7lb
    @Premkumar-zk7lb 3 роки тому +1

    🙏

  • @CodingWithPrakash_
    @CodingWithPrakash_  6 місяців тому

    ✅ Useful Links
    𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 - instagram.com/codingwithprakash/
    𝐖𝐡𝐚𝐭𝐬𝐀𝐩𝐩𝐂𝐡𝐚𝐧𝐧𝐞𝐥 - whatsapp.com/channel/0029VaACtTa4tRrpDCQc5f44
    𝐋𝐢𝐧𝐤𝐞𝐝𝐢𝐧 - www.linkedin.com/in/prakash-shukla/

  • @roastforfun7931
    @roastforfun7931 2 роки тому +5

    Not helpful could not get the concept

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

    Thank you sir, for great Explaination🙏😇

  • @alokbind3305
    @alokbind3305 2 роки тому +1

    Nice explanation 🔥

  • @rajulshakywar3168
    @rajulshakywar3168 2 роки тому

    Great explanation