Split Array Largest Sum | Leetcode 410. Daily Challenge | Binary Search Hard Interview Problem

Sdílet
Vložit
  • čas přidán 30. 03. 2022
  • Join this channel to get access to perks:
    / @probabilitycodingisfu...
    Connect with me on LinkedIn : / alisha-parveen-80579850
    Check out our other playlists:
    Dynamic Programming:
    • Dynamic Programming
    Trees:
    • Trees
    Heaps and Maps:
    • Heaps and Maps
    Arrays and Maths:
    • Arrays and Maths
    Bit Manipulation:
    • Bit Manipulation
    Greedy Algorithms:
    • Greedy Algorithms
    Sorting and Searching:
    • Sorting and Searching
    Strings:
    • Strings
    Linked Lists:
    • Linked Lists
    Stack and Queues:
    • Stacks and Queues
    Two Pointers:
    • Two pointers
    Graphs, BFS, DFS:
    • Graphs, DFS, BFS
    Backtracking:
    • Backtracking
    Non- DSA playlists:
    Probability:
    • Probability
    SQL-Basic Join functions:
    • SQL - Basic JOIN Funct...
    SQL-Basic Aggregate functions:
    • SQL-Basic Aggregate Fu...

Komentáře • 61

  • @probabilitycodingisfunis1

    int low = *max_element(nums.begin(),nums.end()); // 8
    int high = accumulate(nums.begin(),nums.end(),0); // 23
    int ans = low;
    while(lowm)
    low = mid+1;
    else
    {
    ans = mid; //minimize ans
    high = mid-1;

    }


    }

    return ans;


    }

    int no_of_subarrays_with_max_sum_as_mid(vector&nums, int mid)
    { int sum =0;
    int count = 1;

    for(int i=0;imid)
    {
    sum = nums[i];
    count++;
    }
    else
    sum+=nums[i];
    }

    return count;

    }

    • @dhananjoydey1337
      @dhananjoydey1337 Před 2 lety

      can you please upload solution of today's POTD?

    • @bharathkumar5870
      @bharathkumar5870 Před 2 lety

      hi,can you please reply why this is failing.I have just made one simple change ,i have written "=" case and "

  • @RohanSaluja
    @RohanSaluja Před 2 lety +9

    I woke up in the morning and the first thing I saw was this question. And so, I went to bed again🙇🏻‍♂️🙅🏻‍♂️

  • @informative180
    @informative180 Před 2 lety +7

    the effort you put in explanation is awesome and exceptional.
    keep making such videos.
    thanku so much .

  • @AbhimanyuSingh-vg9cl
    @AbhimanyuSingh-vg9cl Před rokem +4

    You explained better than my relevel(unacedemy) teacher.Thanks.My confusion resolved.

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

    thanks a lot..
    i have watch many video. in every other video some how they get complicated in explaining how to select the low value...
    here its really cleared a lot...

  • @sarankumar165
    @sarankumar165 Před 2 lety +5

    brilliant problem and great explanation, LC :( That's how you gonna end an awesome March man!!

  • @manasvipathak391
    @manasvipathak391 Před rokem

    Thankyou. Makes understanding very clear.

  • @aryankhairwal
    @aryankhairwal Před 11 měsíci +1

    You solved it So Effortlessly, Nice Explanation. Thank you ❤️

  • @krishvibes1506
    @krishvibes1506 Před rokem

    Wow! Great explanation!

  • @nikhilsoni8840
    @nikhilsoni8840 Před měsícem

    Thnx a lot didi you explained it in the best way....after getting disappointed from 2 BIG youtubers. Finally the topic is cleared here
    Thanks ❤

  • @navoditatandon5476
    @navoditatandon5476 Před 6 měsíci

    Amazing. Thank you !!!

  • @rogeliocxyz
    @rogeliocxyz Před 10 měsíci +6

    This has to be the best explaination for this problem on this platform, thank you!

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

    I never thought that in this question we can use Binary Search.
    Good explanation...

  • @arjunpunni4221
    @arjunpunni4221 Před rokem +1

    Your insights are just as beautiful as you are 😉, and I think that's really amazing. Keep shining!🤞

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

    well explained !!!

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

    superb explanation...literally the best explanation for this problem on yt

  • @purnamritab
    @purnamritab Před 6 měsíci

    Superb explanation, thank you so much.

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

    perfect😁😅 Thanks for approach

  • @happyyaar3157
    @happyyaar3157 Před rokem

    Your explanation is just amazing

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

    Thank u mam
    The way u explained is next level❤️
    U deserve more subs🙏

  • @ekengineer9868
    @ekengineer9868 Před rokem +1

    Nice explanation didi

  • @pranavkhatri30
    @pranavkhatri30 Před rokem

    great explanation bhai!!

  • @namanshah8523
    @namanshah8523 Před 2 lety

    very well explained ma'am

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

    Well explained 🎉

  • @explained737
    @explained737 Před 4 měsíci +1

    Awesome explanation mam❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤

  • @HetNotFound
    @HetNotFound Před měsícem

    very well explained...tnx ma'am😊

  • @StarletteLuxury
    @StarletteLuxury Před 5 měsíci

    god level explaination mam

  • @harshprajapati2729
    @harshprajapati2729 Před rokem

    Thanks for the video

  • @meetpatil8531
    @meetpatil8531 Před 8 měsíci

    nice explanation didi.....💯

  • @Idukhan-jj9kc
    @Idukhan-jj9kc Před 2 lety +1

    💯💯

  • @ushapandey1088
    @ushapandey1088 Před 6 měsíci

    Thanku its today gfg potd

  • @litegamertech1723
    @litegamertech1723 Před 2 lety

    Awesome explanation 🔥

  • @meandpenguinvlogs8221
    @meandpenguinvlogs8221 Před 2 lety

    💯

  • @meandpenguinvlogs8221
    @meandpenguinvlogs8221 Před 2 lety

    👍👍👍👍

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

    this question is exactly same to book allocation and painter's partition.

  • @jithuboi
    @jithuboi Před rokem

    Thank you.

  • @rohan7071
    @rohan7071 Před 2 lety

    Oh thank goddddd for this!!! 🤕

  • @dhananjoydey1337
    @dhananjoydey1337 Před 2 lety

    Niceeeeee

  • @raghavgoyal9153
    @raghavgoyal9153 Před rokem

    Thanku very much.

  • @rahulbhandari3558
    @rahulbhandari3558 Před 2 lety

    Best explanation 💯

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

    wow

  • @piyushagrawal3709
    @piyushagrawal3709 Před 2 lety

    How much time should I give to one question and after how much time I should see the solution

  • @AmarjeetKumar-to9ub
    @AmarjeetKumar-to9ub Před rokem

    🔥++

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

    Is the mid value is calculated using indices but here with direct values can anyone explain

  • @vd5875
    @vd5875 Před rokem

    Can you tell me the error, not getting proper output
    int isPossible(long long int a[], long long int n, long long int k, long long int mid)
    {
    int arrayCount = 1;
    long long int sum = 0;
    for(int i = 0; i < n; i++)
    {
    if(sum + a[i]

  • @bharathkumar5870
    @bharathkumar5870 Před 2 lety

    this question is same as books allocation problem....

  • @me10amaanakhtar55
    @me10amaanakhtar55 Před 6 měsíci

    Y star kyo lagaya gaya h please explain this

  • @dhruvgoel25
    @dhruvgoel25 Před 2 lety

    Very nice explanation 👏

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

    U r extremely cute😳

  • @Rajat_maurya
    @Rajat_maurya Před 2 lety

    Not uploading videos?

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

    Woh mujhe apse doubt puchne hai toh app apna number de sakti ho !