Minimize the Heights | Love Babbar DSA Sheet Q9 | Arrays

Sdílet
Vložit
  • čas přidán 11. 09. 2024
  • ✅ Useful Links
    𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 - / codingwithprakash
    𝐖𝐡𝐚𝐭𝐬𝐀𝐩𝐩𝐂𝐡𝐚𝐧𝐧𝐞𝐥 - whatsapp.com/c...
    𝐋𝐢𝐧𝐤𝐞𝐝𝐢𝐧 - / prakash-shukla
    SUBSCRIBE AND HIT BELL ICON TO CHECK MORE OF MY CONTENT
    czcams.com/users/Pra...
    Minimize the Heights | Love Babbar DSA Sheet Q9 | Arrays
    𝐌𝐔𝐒𝐈𝐂 𝐂𝐑𝐄𝐃𝐈𝐓
    Track: Julius Dreisig & Zeus X Crona - Invisible [NCS Release]
    Music provided by NoCopyrightSounds.
    Watch: • Julius Dreisig & Zeus ...
    Free Download / Stream: ncs.io/Invisibl... Complete Crash Course at prakashshukla.com
    Track: Axollo - Silence (ft. Josh Bogert) [NCS Release]
    Music provided by NoCopyrightSounds.
    Watch: • Axollo - Silence (ft. ...
    Free Download / Stream: ncs.io/ASilence

Komentáře • 77

  • @AlokKumar-ld9qr
    @AlokKumar-ld9qr Před 2 lety +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 Před 2 lety +10

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

  • @prasads7530
    @prasads7530 Před 2 lety +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

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

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

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

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

  • @ankukushwaha1098
    @ankukushwaha1098 Před 2 lety +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 ❣

  • @SaifKhan-lq1sp
    @SaifKhan-lq1sp Před rokem +1

    Bahut jayada hi clear.
    Very well done.

  • @gowthambhat1498
    @gowthambhat1498 Před měsícem +1

    you deserve more subscribers, excellent explanation.

  • @mugdhamonga25
    @mugdhamonga25 Před rokem +2

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

  • @aasifali9139
    @aasifali9139 Před 2 lety +2

    Thanks for this video sir. Very well explained.

  • @Just_Clip_8055
    @Just_Clip_8055 Před rokem +1

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

  • @showsshorts4696
    @showsshorts4696 Před 2 lety +2

    lovely explanation by you sir thanks alot

  • @travelnlearn
    @travelnlearn Před 2 lety +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

  • @rishabhgupta9846
    @rishabhgupta9846 Před 2 lety +2

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

  • @Shivamkumar-ue4hl
    @Shivamkumar-ue4hl Před 2 lety +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 Před rokem

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

  • @dhirajkumarsahu999
    @dhirajkumarsahu999 Před 2 lety

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

  • @user-bc1mp6rh1t
    @user-bc1mp6rh1t Před rokem +1

    best explanation of this question on youtbe

  • @levi-lb6dp
    @levi-lb6dp Před 2 lety +1

    thanks bro for precise and simple solution

  • @wtfun5465
    @wtfun5465 Před rokem +1

    best explanation than other viedeos

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

    Only video that helps, tysm

  • @black_shadow4627
    @black_shadow4627 Před rokem +1

    great explanation thanks a lot

  • @prateektripathi100
    @prateektripathi100 Před 2 lety +2

    Great Explanation....

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

    wow simplest explanation ever

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

    Perfectly explained
    💯

  • @sujithsaikalakonda4863
    @sujithsaikalakonda4863 Před rokem +1

    Nice explanation brother.

  • @ajit287
    @ajit287 Před 2 lety +2

    Very well explained...

  • @user-gq1ij
    @user-gq1ij Před 2 lety +2

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

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

    A simple and great explanation👌

  • @ModifiedGaddiyan
    @ModifiedGaddiyan Před rokem +1

    best solution ever

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

    superb explanation

  • @AAYUSHSHARMAPCE21CS002

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

  • @05_hemantpanchariya92
    @05_hemantpanchariya92 Před rokem +1

    thank you prakash bhai

  • @growmore1672
    @growmore1672 Před 2 lety +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

  • @azimuddin6921
    @azimuddin6921 Před rokem +1

    nice bhai, Thank you

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

    Nice explanation 🔥

  • @lalit-singh-bisht
    @lalit-singh-bisht Před rokem

    best explanation guruji

  • @datakube3053
    @datakube3053 Před rokem

    Bhai bohot sahi explain kiya hai

  • @PrinceKumar-rt7qc
    @PrinceKumar-rt7qc Před 2 lety +1

    well explained

  • @amansingh.h716
    @amansingh.h716 Před rokem

    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

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

    Thank you sir

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

    great work..

  • @tanvitripathi5743
    @tanvitripathi5743 Před 2 lety +2

    Keep going ❤❤

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

    clean and clear

  • @sunidhibhardwaj4529
    @sunidhibhardwaj4529 Před 3 měsíci +1

    nice explanation

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

    super bhaiya keep going

  • @pratyushtripathi1728
    @pratyushtripathi1728 Před 7 dny +1

  • @shubhamshete8877
    @shubhamshete8877 Před rokem

    Best explanation

  • @blockkedd
    @blockkedd Před 6 měsíci +1

    can anyone explain the line no 52 ????

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

    keep going bhaiya

  • @omkarsawant9267
    @omkarsawant9267 Před 10 měsíci

    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

  • @abdurrahman-gn6hy
    @abdurrahman-gn6hy Před 2 lety +2

    thanks ur r good

  • @everyone8057
    @everyone8057 Před rokem

    thek hai

  • @lalit-singh-bisht
    @lalit-singh-bisht Před rokem

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

  • @vyankteshdwivedi674
    @vyankteshdwivedi674 Před rokem

    max - min -2k ni kar skte kya

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

    bro concept samaj nhi aaya kya karru
    ???

  • @nikhilmaliwal7914
    @nikhilmaliwal7914 Před rokem

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

  • @MyAnish22
    @MyAnish22 Před 2 lety +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]

  • @Premkumar-zk7lb
    @Premkumar-zk7lb Před 2 lety +1

    🙏

  • @user-qo6vg5jb6y
    @user-qo6vg5jb6y Před 2 lety +1

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

  • @roastforfun7931
    @roastforfun7931 Před 2 lety +4

    Not helpful could not get the concept

  • @CodingWithPrakash_
    @CodingWithPrakash_  Před 4 měsíci

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

  • @saket5925
    @saket5925 Před rokem +1

    Thank you sir, for great Explaination🙏😇

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

    great explanation 🤩

  • @rajulshakywar3168
    @rajulshakywar3168 Před 2 lety

    Great explanation