Thank you for the valuable content and detailed C++ solutions! Your videos have been incredibly helpful for my learning journey. Could you also provide solutions for LeetCode contests or other problems in Java? It would be beneficial for those of us focusing on Java. Your insights are invaluable, and having them in Java would be a great addition.
Bro, you have some serious teaching skills. Watched this twice and now the clarity of the heap solution is next level in my mind. So much, that I am able to code it in java by myself. Heartfelt thanks :)
I am here to understand Heap approach. was waiting for your video mik Update - Loved the explanation. I was able to pause it and coded on my own. Please share PDF notes of 2nd Approach as it is something to keep a note of.
Hi @codestorywithMIK, in the discussion section, I also saw one approach involving sliding window with binary search. Will you be able to share that approach as well? Thanks
In approach-1, The nested loops are used so it's O(n^2) + for sorting O(NlogN) + for addition O(N). Hence the TC has to be O(N^2) right?? why it's O(n^2 * log(n))????
Please see my pinned comment. Size of temp will be of order n^2 because it contains sum of all possible subarrays . So sorting will take O(n^2 * log (n^2)) Which can be written as O(n^2 * log(n))
leetcode official solution and explanation is pathetic. I wonder what i would do if you didn't upload your explanations. thanks a lot sir for helping me in my learning journey
Slight Correction - Approach-1 , we are sorting the temp array which contains all the subarray sums. So T.C : O(n^2 * log(n))
bacco wala question hai.
Cool 🙌
@@aws_handles leetcode ka 60% question kar loga agar priority queue ata hai to.
sir please teach more unique concepts like this one.
sir ,why not n^2log(n^2)
Who's waiting for hard version 🔥🔥🔥🔥
Your explanation is better than all other UA-camrs and leetcode editorial. Thanks🥰
The second approach taught me a lot. I can't wait for the harder version of this problem!! Thanks a lot for these videos ❤
Thanks for writing "Learn Something New " in thumbnail otherwise I was no going to open the video 😅😅
14 minutes into the video and able to solve it own my own ,seriously men you have some next level teaching skill.
Thank you for the valuable content and detailed C++ solutions! Your videos have been incredibly helpful for my learning journey.
Could you also provide solutions for LeetCode contests or other problems in Java? It would be beneficial for those of us focusing on Java. Your insights are invaluable, and having them in Java would be a great addition.
Thank you so much for this new thing. waiting for third approach for learning something more.
Great video, along with very good explanation. Please bring the hard solution too. Thank you.
Bro, you have some serious teaching skills. Watched this twice and now the clarity of the heap solution is next level in my mind. So much, that I am able to code it in java by myself. Heartfelt thanks :)
I was waiting for this bhaiya!! Thanks a lot
I am here to understand Heap approach. was waiting for your video mik
Update - Loved the explanation. I was able to pause it and coded on my own. Please share PDF notes of 2nd Approach as it is something to keep a note of.
I was also waiting for the video to get to know about heap approach cleanly...
@@priyanshkumar17 cool bro. mast samjhaya hai bhai ne
plz make a video on optimized solution 🙏🙏🙏🙏............
i am waiting fort it... thanks
bhaiya your videos helps me alot. Please never stop this series. You are also a reason of my consistency.
Hi @codestorywithMIK, in the discussion section, I also saw one approach involving sliding window with binary search. Will you be able to share that approach as well? Thanks
i submitted using brute force. it worked. now here to learn something new
bhaiya pls contest ka 3rd question
yesss, legend is here
Excellent explanation. CFBR!
Finally wait is over
can't wait for the 3rd approach
In approach-1,
The nested loops are used so it's O(n^2) + for sorting O(NlogN) + for addition O(N).
Hence the TC has to be O(N^2) right??
why it's O(n^2 * log(n))????
Please see my pinned comment.
Size of temp will be of order n^2 because it contains sum of all possible subarrays .
So sorting will take O(n^2 * log (n^2))
Which can be written as
O(n^2 * log(n))
we can do it with deque too, right? following same approach-2, since the new subarray sum added will always be greatest
bhaiya hard version video please. new things we can learn
Thanks a lot bhaiya ❤❤
god level approach
first solution ka overall time complexity O(n*n) hai aur second wale ka , O((n*n)*(logn)), toh phir second approach use karke kya faeda??
If feasible, please do cover the Binary Search and Sliding Window approach too, it was horrible in the editorial
just wow
awesome
nice explanation dude
explain the third approach from the editorial
it is solved using binary search
Can you make video on the binary search solution
kya bawal technique ttha heap wala, RESPECT++
PLEASE UPLOAD 3rd APPROACH
in approach 1, why did we have do divide result by modulo? as I see constraints are less only....please explain
Whenever I Stuck in Any Coding Problem I Wish You Make Video On It. Really Great Explanation! 🫠
I thought of priority queue approach myself before even opening the video but it tooke me a lot of time, how can i improve my speed?
Please make videos for leetcode contest solutions
today i solved on my own😀
The silent killer at the beginning of Every DSA channel
best explanation
waiting for the third approach,
Binary search approach pe video ayegi kya bhai ??
Sort humlog sab subarray sum ka kr rahe hai toh time complexity n^2*2logn hoga na bhai ?
Yes bro
yes
yes correct. My bad.
Added in the Pinned Comment.
bhai aap kitna travel krtey ho saas leta hu to next trip aa jati hai apki
Best solution by binary seach still exists, tho it's hard.
bhai tum konse company me ho?? Great content btw
bhai if possible try to make leetcode biweekly and weekly contest video..please?it will help us
Yes i usually make them. But i was travelling this weekend and reached home late. Will try to make soon ❤️
Sir prefix sum se kese kerna hai
hard version kab upload hoga?
op sir
please make hard version video sir
if the given array is not in sorted fashion then also this will work?
Yes. Heap will eventually sort the result
Waiting for hard version!
No fear. MIK is here
Binary search kaise lagega?
bhai leetcode 409 ka D ka solution vedios please
approach 3 jaldi daldo bhai
POTD solve nahi ho raha approch -01 se bahut hi long array ke liye runtime error de raha hai
yes last case fail ho raha
Make fast hard version
leetcode official solution and explanation is pathetic. I wonder what i would do if you didn't upload your explanations. thanks a lot sir for helping me in my learning journey
Wait a sec how can we use this same approach to get subarray sums in decreasing order?
please solve leetcode 3225
Bhai vaise second solution optimal to nhi h
Dono solution ki both time and space complexity equal h