Minimum Array Sum | Detailed for Beginners | Contest Problem | Leetcode 3366 | codestorywithMIK

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

codestorywithMIK

codestorywithMIK

Күн бұрын

Пікірлер: 34
@cricketsureshlucky
@cricketsureshlucky 3 күн бұрын
thank you so much sir it means a lot to me
@deepanshuverma6237
@deepanshuverma6237 3 күн бұрын
tq
@divyanshu3404
@divyanshu3404 3 күн бұрын
It would be very helpful if you also post contest problems. love your approach to solve problems
@thekindspill
@thekindspill 3 күн бұрын
Thanks a lot for contest video ❤
@guddukumar-v8z5l
@guddukumar-v8z5l 3 күн бұрын
Thank you posting contest problems solution bhaiyya.
@hare_krishna8411
@hare_krishna8411 3 күн бұрын
belive yourself ❤ aur agar greedy method se operation 1 bhi possible nahi, kyunki even after /ing by 2 maximum element can remain be maximum.
@rahilkhera8215
@rahilkhera8215 3 күн бұрын
3364. Minimum Positive Sum Subarray : I tried this with sliding window but failed finally submitted with brut force. 3361. Shift Distance Between Two Strings : I tried this with prefix sum of both previous and next cost but couldn't . Finally solved with Flyod Warshall algo. Thanks for covering this question, I tried doing it greedily using Heap, but as you figured out, greedy fails.
@Strawcontamination
@Strawcontamination 3 күн бұрын
Thank you for making contest questions video
@gui-codes
@gui-codes 3 күн бұрын
Thank you so much for contest problems 😭😭😭 Please also post Qn-2, I could not solve it.
@sunshineandrainbow5453
@sunshineandrainbow5453 3 күн бұрын
Thank you sir, Please post question 4 as well.
@codeandtalk6
@codeandtalk6 3 күн бұрын
I overthinked in this problem
@rrrhitk
@rrrhitk 3 күн бұрын
Please solve Qn4 too
@Aditya-qx7nf
@Aditya-qx7nf 3 күн бұрын
1st problem : done using sliding window 2nd problem : done using hashmaps 3rd problem : got TLE when did with recursion and wasn't able to apply DP correctly
@KrishnaTripathi1709
@KrishnaTripathi1709 3 күн бұрын
Can u solve 3rd question of biweekly 144? It will be of great help
@peterfromengland8663
@peterfromengland8663 2 күн бұрын
Yes🥲🥲
@dayashankarlakhotia4943
@dayashankarlakhotia4943 3 күн бұрын
Please solve qn.no.4
@gui-codes
@gui-codes 3 күн бұрын
Qn-2 also please @codestorywithMIK
@dayashankarlakhotia4943
@dayashankarlakhotia4943 3 күн бұрын
Qn no.2 public boolean isPossibleToRearrange(String s,String t,int k){ int n=s.length(); int div=n/k; Mapmpp=new HashMap(); for(int i=0;i
@vaibhav454
@vaibhav454 3 күн бұрын
I thought of using max heap for the greedy approach
@rajatrajgautam3224
@rajatrajgautam3224 3 күн бұрын
i used and got wrong answer
@aws_handles
@aws_handles 3 күн бұрын
I tried greedy after sorting. It failed and i got blank. Thank you so much for clarifying
@dayashankarlakhotia4943
@dayashankarlakhotia4943 3 күн бұрын
First 🎉❤
@jeehub041
@jeehub041 3 күн бұрын
And isme ek chiz ha greedy fail hone ka sabse bada reason ha ki jo nums[I] greater than k hone pi hi subtract kar sakte ha , agar aise nahi dia hota tab greedy chal jaata👍
@mohammedtawfeeq9100
@mohammedtawfeeq9100 3 күн бұрын
Hi
@Tech_Explorer-d6g
@Tech_Explorer-d6g 3 күн бұрын
I'm a bit confused , int result = int.MaxValue; // Minimum sum , is it get initialized everytime we call the solve method and won't it affect the previous result value.
@anushkathakur6531
@anushkathakur6531 2 күн бұрын
Bhaiya, same if condition ke andar jo aapne option 3 aur option 4 ka logic kyon likha.... option 3 ka logic turant lagne ke baad bhi toh ek baar op1>0 and op2>0 check karna padega na option 4 ka logic lagane se pehle....I got confused on that part that why is that working correctly within same if condition without checking for this condition ( op1>0 and op2>0)again????CAN YOU PLEASE EXPLAIN
@ArnabBhadra02
@ArnabBhadra02 Күн бұрын
why op1op2 and op2op1 are in same block
@KrishnaTripathi1709
@KrishnaTripathi1709 3 күн бұрын
Missed the fourth case of both happening together
@Resham298
@Resham298 3 күн бұрын
why do we explore the condition of not applying any operation pls give me example for such case it will help me to understand better.
@AnshumanSrivastava-f9w
@AnshumanSrivastava-f9w 2 күн бұрын
Say, you have just 1 op1 and array of size 5 - that means apply on 1 and not apply on rest 4
@the_shubham738
@the_shubham738 3 күн бұрын
don't you think that you are performing op1 and op2 on an index more than once. Please check it and make me clear.
@codestorywithMIK
@codestorywithMIK 3 күн бұрын
When you apply any operation on an index i, we move to i+1 in the next recursive call. So we are never performing op1 or op2 more than once in an index i
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,7 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,5 МЛН
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 6 МЛН
3366. Minimum Array Sum | Not Greedy | DP | Memoization
14:30
Aryan Mittal
Рет қаралды 647
I'm 24. If you're 14-23 please watch this...
6:37
Tharun Speaks
Рет қаралды 491 М.
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
Maximum Matrix Sum | Leetcode 1975
12:33
Techdose
Рет қаралды 1,8 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,7 МЛН