It would be very helpful if you also post contest problems. love your approach to solve problems
@thekindspill3 күн бұрын
Thanks a lot for contest video ❤
@guddukumar-v8z5l3 күн бұрын
Thank you posting contest problems solution bhaiyya.
@hare_krishna84113 күн бұрын
belive yourself ❤ aur agar greedy method se operation 1 bhi possible nahi, kyunki even after /ing by 2 maximum element can remain be maximum.
@rahilkhera82153 күн бұрын
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.
@Strawcontamination3 күн бұрын
Thank you for making contest questions video
@gui-codes3 күн бұрын
Thank you so much for contest problems 😭😭😭 Please also post Qn-2, I could not solve it.
@sunshineandrainbow54533 күн бұрын
Thank you sir, Please post question 4 as well.
@codeandtalk63 күн бұрын
I overthinked in this problem
@rrrhitk3 күн бұрын
Please solve Qn4 too
@Aditya-qx7nf3 күн бұрын
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
@KrishnaTripathi17093 күн бұрын
Can u solve 3rd question of biweekly 144? It will be of great help
@peterfromengland86632 күн бұрын
Yes🥲🥲
@dayashankarlakhotia49433 күн бұрын
Please solve qn.no.4
@gui-codes3 күн бұрын
Qn-2 also please @codestorywithMIK
@dayashankarlakhotia49433 күн бұрын
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
@vaibhav4543 күн бұрын
I thought of using max heap for the greedy approach
@rajatrajgautam32243 күн бұрын
i used and got wrong answer
@aws_handles3 күн бұрын
I tried greedy after sorting. It failed and i got blank. Thank you so much for clarifying
@dayashankarlakhotia49433 күн бұрын
First 🎉❤
@jeehub0413 күн бұрын
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👍
@mohammedtawfeeq91003 күн бұрын
Hi
@Tech_Explorer-d6g3 күн бұрын
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.
@anushkathakur65312 күн бұрын
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Күн бұрын
why op1op2 and op2op1 are in same block
@KrishnaTripathi17093 күн бұрын
Missed the fourth case of both happening together
@Resham2983 күн бұрын
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-f9w2 күн бұрын
Say, you have just 1 op1 and array of size 5 - that means apply on 1 and not apply on rest 4
@the_shubham7383 күн бұрын
don't you think that you are performing op1 and op2 on an index more than once. Please check it and make me clear.
@codestorywithMIK3 күн бұрын
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