Hello Sir, Can you post a couple of videos on how to prove greedy solutions for some good problems or if you already have posted in your channel can you share the link or problem name. I am facing difficulty in Greedy Problems.
Bro how you came to the conclusion that by using binary search the complexity becomes O(n*logn)?? Because it is now even (n^2+nlogn) Reason:- we need to build the and array for n positions and that will take n^2 time and then binary search on each array we build Please use Hindi language if possible because English me hum Indians kabhi kabhi bolte kuch aur h aur kahna kuch chahte ha
amazing explaination
Bro great please change the color of your cursor. It is not visible when seen from mobile.
awesome!
Hello Sir, Can you post a couple of videos on how to prove greedy solutions for some good problems or if you already have posted in your channel can you share the link or problem name. I am facing difficulty in Greedy Problems.
Bhaiya come with some of greedy problem set
Maja agaya.
Bro how you came to the conclusion that by using binary search the complexity becomes O(n*logn)??
Because it is now even (n^2+nlogn)
Reason:- we need to build the and array for n positions and that will take n^2 time and then binary search on each array we build
Please use Hindi language if possible because English me hum Indians kabhi kabhi bolte kuch aur h aur kahna kuch chahte ha
To build the AND array it takes only O(N) times. I mean to build a segment tree.
Bhaiya some has also solve it with sliding window approach also.
The only difference is in the last part - instead of using segment trees, you can use prefix sum to compute the bitwise AND.
@@codingmohan ok
Will try to find that approach to .
But ur explanation was gud, I got to know the magic of segment tree 1st time.
thanks mohan
Thx 4 the video bhaiya ❤
hello can you post video about Construct String with Minimum Cost (4th problem lc weekly 405)
Here you go - th-cam.com/video/0ErpIxK9QUI/w-d-xo.html
I solved it using precomputation+ bs