Split Array Largest Sum | Leetcode 410 | Range Based Binary Search 🔥🔥 | Live coding session

  Рет қаралды 2,704

Coding Decoded

Coding Decoded

Күн бұрын

Пікірлер: 14
@pavniujla654
@pavniujla654 2 жыл бұрын
Your consistency is phenomenal
@vskmahindrakar
@vskmahindrakar 2 жыл бұрын
This ls some what similar to book allocation, painter partition ans aggressive cow problem
@nicolattu
@nicolattu 2 жыл бұрын
Genius ! I thought this one was going to be dp in ranges but couldn't solve today 😕 Apart from that I see most people on leetcode do binary search with: mid = left + (right-left)/2 But I find it easier to do mid = (left + right) / 2 Thanks for the video, and please keep it up 💯
@tanson86
@tanson86 2 жыл бұрын
The reason why they do left + (right-left)/2 is to prevent overflow conditions. If left = Integer.MAX and right = Integer.MAX then the addition will result in an overflow.
@azraazra8273
@azraazra8273 2 жыл бұрын
Super bro please continue this work
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja 2 жыл бұрын
Sure 👍
@VinayKumar-xs6el
@VinayKumar-xs6el 7 ай бұрын
line 33 can directly assign current num to totalRunningSum
@greymatters22
@greymatters22 5 ай бұрын
what is time and space complexity? is it TC : O(nlogn) and SC : O(logn) ?
@priyadarshanr296
@priyadarshanr296 2 жыл бұрын
Can you explain why you chose low=10 initially ? And I feel this to ne hard coz I was not able to think of a binsary search approach here coz the array is undsorted in nature .
@sreejithag1237
@sreejithag1237 2 жыл бұрын
maximum element in the array will be the minium possible sum if we divide the n elements array to n individual groups.
@xtractcode9133
@xtractcode9133 2 жыл бұрын
after division the best condiition for the highest number in the array to be the answer itself hence we are taking low = 10 .............
@zero-w1b
@zero-w1b Жыл бұрын
in this question why are we doing high=mid why not high = mid-1. can someone explain
@neuron8186
@neuron8186 Жыл бұрын
bro why you add all hard que to medium have some mercy on us
@CodeWithSunchitDudeja
@CodeWithSunchitDudeja Жыл бұрын
Bro easy playlist kzbin.info/aero/PLEI-q7w3s9gThW_pJItca8zIvZ-uxfpcW
Mom had to stand up for the whole family!❤️😍😁
00:39
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 19 МЛН
Split Array Largest Sum - Leetcode 410 - Python
16:51
NeetCode
Рет қаралды 84 М.
BS 19. Painter's Partition and Split Array - Largest Sum
11:20
take U forward
Рет қаралды 109 М.
Viral Video of a Man's Crazy Job Interview
16:02
Darryl Vega TV
Рет қаралды 1,4 МЛН
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 133 М.
This new CSS property just solved animating to height auto
5:48
Kevin Powell
Рет қаралды 29 М.
Is Computer Science still worth it?
20:08
NeetCodeIO
Рет қаралды 408 М.
Acing Google Coding Interview as an 18 year old High School Student
48:57
William Lin (tmwilliamlin168)
Рет қаралды 2,8 МЛН
DP 54. Partition Array for Maximum Sum | Front Partition 🔥
21:39
take U forward
Рет қаралды 96 М.