Split Array Largest Sum | Leetcode 410. Daily Challenge | Binary Search Hard Interview Problem
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...
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;
}
can you please upload solution of today's POTD?
hi,can you please reply why this is failing.I have just made one simple change ,i have written "=" case and "
I woke up in the morning and the first thing I saw was this question. And so, I went to bed again🙇🏻♂️🙅🏻♂️
🤣
😂😂 legend
the effort you put in explanation is awesome and exceptional.
keep making such videos.
thanku so much .
You explained better than my relevel(unacedemy) teacher.Thanks.My confusion resolved.
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...
brilliant problem and great explanation, LC :( That's how you gonna end an awesome March man!!
Thank you, yes it's an amazing problem 🤩
Thankyou. Makes understanding very clear.
You solved it So Effortlessly, Nice Explanation. Thank you ❤️
Wow! Great explanation!
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 ❤
Amazing. Thank you !!!
This has to be the best explaination for this problem on this platform, thank you!
I never thought that in this question we can use Binary Search.
Good explanation...
Your insights are just as beautiful as you are 😉, and I think that's really amazing. Keep shining!🤞
well explained !!!
superb explanation...literally the best explanation for this problem on yt
Superb explanation, thank you so much.
perfect😁😅 Thanks for approach
Your explanation is just amazing
Thank u mam
The way u explained is next level❤️
U deserve more subs🙏
Nice explanation didi
great explanation bhai!!
very well explained ma'am
Well explained 🎉
Awesome explanation mam❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤
very well explained...tnx ma'am😊
god level explaination mam
Thanks for the video
nice explanation didi.....💯
💯💯
Thanku its today gfg potd
Awesome explanation 🔥
Thank you 🙌
💯
👍👍👍👍
this question is exactly same to book allocation and painter's partition.
Thank you.
Oh thank goddddd for this!!! 🤕
Niceeeeee
Thanku very much.
Best explanation 💯
Glad it helped
wow
How much time should I give to one question and after how much time I should see the solution
🔥++
Is the mid value is calculated using indices but here with direct values can anyone explain
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]
this question is same as books allocation problem....
Y star kyo lagaya gaya h please explain this
Very nice explanation 👏
Thank you so much ❤️
U r extremely cute😳
Not uploading videos?
Woh mujhe apse doubt puchne hai toh app apna number de sakti ho !
Pro comder ko mera pranam😏