wtf bro ?! and I literally wasted all my time on videos with higher views just to realize that I was never able to solve the binary search problems myself but rather always somehow or the other ended up mugging the solutions to particular problems. And now I landed upon a guy with just around 5.6k views with the most legendary intuitive video on binary search problem solving ever. C'mon bruh you deserve at least 1e9 TLE times more views than this XD. some people teach you the solution and then legends like luv teach you the intuition !! Hats off to you brother. You are one of the best teachers I ever learnt from. Just this one video makes me feel like I can do any binary search problem myself now 💓💓💓
Literally, Luv bhaiya fucked the whole strategy of Unacademy to earn money by teaching trivial things for competitive programming. And he is teaching better than any paid courses of Coding ninjas, Pepcoding, coding block, and Unacademy and all. His way of teaching and the material he's teaching is really outstanding. And everything is for free. Thanks a lot, bhaiya.
You are amazing bro... I am a 1st year CSE student in a not so good private college, and we all really get a lot of help and motivation that even we can do CP as well... So keep it up and please dont stop, guiding us...
Literally, Luv bhaiya fucked the whole strategy of Unacademy to earn money by teaching trivial things for competitive programming. And he is teaching better than any paid courses of Coding ninjas, Pepcoding, coding block, and Unacademy and all. His way of teaching and the material he's teaching is really outstanding. And everything is for free. Thanks a lot, bhaiya. 3
Bhai, please make a video on persistent segment tree. You explain very clearly. You recommended to watch Gaurav Sen video but that's more than confusing.
I bit more optimized approach would be to first sort the heights and then make the predicate function such that it gets the upper bound of height h and then calculates the wood collected bool func(int h, vector &v, int m){ auto it = upper_bound(v.begin(), v.end(), h); int w = 0; while(it != v.end()){ int el = *it; w+= el-h; ++it; } return w>=m; } do check it out also thanks for the cp playlist Luv, it is helping me a lot 🙏🙏
bro , i have one doubt ,could anyone plzz clarify ,why are u assigning "hi" with 1e9 at the beginning ,coz max height could be anything between 0 and 1e9. Someone plss clarify my doubt???????......
We this code works (it has been executed in the Sphere Online Judge). #include using namespace std; int main() { long long n,m; cin>>n>>m; vector v(n); for(long long i=0;i>v[i]; long long low=0,high=*max_element(v.begin(),v.end()),mid,H; while(low=m) H=mid,low=mid+1; else high=mid-1; } cout
Sir It will only work when the height of trees are monotonic ? As T t t t F F F Is only possible if the height are either in n ascending or descending order ? I am still a beginner Thank s for you playlist
wtf bro ?! and I literally wasted all my time on videos with higher views just to realize that I was never able to solve the binary search problems myself but rather always somehow or the other ended up mugging the solutions to particular problems. And now I landed upon a guy with just around 5.6k views with the most legendary intuitive video on binary search problem solving ever. C'mon bruh you deserve at least 1e9 TLE times more views than this XD.
some people teach you the solution and then legends like luv teach you the intuition !! Hats off to you brother. You are one of the best teachers I ever learnt from. Just this one video makes me feel like I can do any binary search problem myself now 💓💓💓
Man , I must say u r just mind blowing, I just solved 170 questions in last 1 n a half month n yep you contribution can't be ignored
from where and did you do topic wise?
@@yath3681 leetcode
Literally, Luv bhaiya fucked the whole strategy of Unacademy to earn money by teaching trivial things for competitive programming. And he is teaching better than any paid courses of Coding ninjas, Pepcoding, coding block, and Unacademy and all. His way of teaching and the material he's teaching is really outstanding. And everything is for free. Thanks a lot, bhaiya.
he himself joined unacademy now lol! but still i respect him and his decision
no one can beat sumeet malik sir in pepcoding
You are amazing bro...
I am a 1st year CSE student in a not so good private college, and we all really get a lot of help and motivation that even we can do CP as well...
So keep it up and please dont stop, guiding us...
obviously, u can do cp bro don't be demotivated just because its a private college keep working hard
This method is basically a tool to solve alot of questions 👍
This is better than any paid course thanku Luv
Awesome content bro. Words cant describe what u r doing. Will always remember you.
Really brother.. Kabhi series band mat karna..continuous rkhna..love u bhai🙌🙌🙌
you are a very good teacher. God bless you!!
Binary search is underrated 😂
Another video...and you nailed it with perfection yet again. You are just wowww
I came on your channel 15 may and I watched 30 video Maja aa rha hai
Way of explaining is 🤩🤩
Luv bhaiya... I m loving ur content 💖
Literally, Luv bhaiya fucked the whole strategy of Unacademy to earn money by teaching trivial things for competitive programming. And he is teaching better than any paid courses of Coding ninjas, Pepcoding, coding block, and Unacademy and all. His way of teaching and the material he's teaching is really outstanding. And everything is for free. Thanks a lot, bhaiya.
3
`Great teacher I have ever seen
Bhaiya same question maine kal hi ki hai.... great content
Absolutely amazing .. Love to watch each and every episode 🔥🔥..
best bsearch this types of ques thnks a lot
Please more such advance problems on binary search.
Bhai, please make a video on persistent segment tree. You explain very clearly. You recommended to watch Gaurav Sen video but that's more than confusing.
the topic is only confusing, gaurav's video is the best resource you are going to find currently.
God level content, keep it up bhai ,really helpful ❤❤❤❤❤
It's gem 👌👌
h = max_element(tree, tree+n) nahi kar sakte kya? Cuz h ka value maximum height of tree se to choti hi hone wali hai?
Two words -
maza aaya .
Thanks luv bhaiya
I bit more optimized approach would be to first sort the heights and then make the predicate function such that it gets the upper bound of height h and then calculates the wood collected
bool func(int h, vector &v, int m){
auto it = upper_bound(v.begin(), v.end(), h);
int w = 0;
while(it != v.end()){
int el = *it;
w+= el-h;
++it;
}
return w>=m;
}
do check it out
also thanks for the cp playlist Luv, it is helping me a lot 🙏🙏
yup i also thought of the same approach
In time complexity, the log(H) is constant as you are considering lo=1 and hi=1e9; so time complexity should be O(N) only
Thanks Bhaiya Practice Questions Descp Wale Boht Helpful Hotw Hai Please Pichli saaari vdos ke descp mein bhi daal do
Great video Thank u bhaiya
Amaaaazeeeeeeeeeeddddddd...........................❤❤❤❤
🎉🎉 majja agya 😊
Thank you ❤️
Very nicely explained
thank you
Awesome man !!! Great explanation!!!
Mind blowing....Please prepare lectures on boost lib in C++
Bohot badiya video bs Bhaiya painter's partition aur allocate books smjha do
I never learned binary search in this way💕
very nicely explained thankyou so much bhaiya
we can also take high = max from the input array.. ?
Yeah, that would decrease complexity even more..
i cannot dry run the mid part as high is 1e9 what is mid then
??
God bless you
Great content bhai 🔥
Thank you Bro!
Video is amazing 🙂
nice bhai jod ho aap
best explanation
Thankyou 🙋♂
Complexity is nlog(N) rest is very good
complexity is NLog(H) as i told in video, where N is size of array and H is max height of tree
bro jaldi next video lao pura tumpe dependent hu mast cheeg malum chal rhi tumse bhai
bhaiya you are great , love you bhaiya.
Bhaiya gfg se karle questions binary search ke ya spoj se hi karna hai
jha se mrzi kro questions krna important hai
Superb!
TH-cam needs to upgrade it algo and start pushiung such gems.
Bhaiya aise type k problems aur solve karo.
Kia ya hai next video dekho
Are you going to make videos on bit masking??
binary search ka alag se playlist banayi hai kya aapne ki aise ho random aati rehti??
playlist hai alag se check krlo chnnel playlist me
after submitting it is showing TLE, why?
@Luv bhaiya please make a videos on sliding window technique
bhaiya, Do u have any plan for placement series.
I'm new to coding
start with c++
please
c++ playlist is already present
Amazing!
Reach++
badiya question hai
Is this a monotonic sequence?
123454321
First it is increasing and then decreasing.
no it has to be either increasing or decreasing to be called monotonic
bhaiya may u explained the labyrinth problem in the next video.
Bhaiya ek doubt hai Binary Search me low
Hello sir, how many months will you takes to complete this course?
Please sir let us know because our placement session about to start in September.
i dont know, please dont be dependent on me for your placements.
Bro yah cp beginner ke liye hai.
For interview & placement watch striver cp list
Bhai string k competitive programming wale questions kab aaenge . Like longest palindromic subsequence , interleaving etc. Please make it ASAP plss🙏🙏
time lagega abhi
bro , i have one doubt ,could anyone plzz clarify ,why are u assigning "hi" with 1e9 at the beginning ,coz max height could be anything between 0 and 1e9.
Someone plss clarify my doubt???????......
because they said less then 1e9 not 1e9 proper if it was given 1e9 then hi=1e9+1
Too good
Bhai aggressive cows bhi karlo from spoj
Please explain aggressive cow questions also
answer to mid mein aayega na....par high aur low pe check kyon kar rahe last pe?
watch previous binary search videos
Bhai please div1 div2 base q solve karvao.
Sir app konsa video editing software use karte ho??
fcpx
@@iamluv ohk sir
bhaiya DP kb start kr rhe
We this code works (it has been executed in the Sphere Online Judge).
#include
using namespace std;
int main()
{
long long n,m;
cin>>n>>m;
vector v(n);
for(long long i=0;i>v[i];
long long low=0,high=*max_element(v.begin(),v.end()),mid,H;
while(low=m)
H=mid,low=mid+1;
else
high=mid-1;
}
cout
Bhaiya solve kiye gaye questions bhi dubara nahi kar raha hu ...... Confusion bohot hoti hai kya karu main?
🧡
but ye kaise pta tha ki ye sorted hai ya nhi
bhaiya, please start making video
Lord🙇♂️
humne hi ko max height of given trees m se kyu nhi lia
Why hi - low > 1
Aggressive Cows question ka bhi Binary Search batao bhaiya
next video
I just solved it today😅
Bhaiya I am going to be in 3rd year after 1 month. Will the course be completed till my placements starts?
Bro yah cp beginner ke liye hai.
For interview & placement watch striver cp list
Sir
It will only work when the height of trees are monotonic ?
As
T t t t F F F
Is only possible if the height are either in n ascending or descending order ?
I am still a beginner
Thank s for you playlist
no height if trees dont need to be monotonic, i dont think you understood what i explained. you need to watch the video again
Lumberdaar lumberjack
source code pls
Just a comment to increase reach.
bhai cout 6 precision tak print karta hai.
double a=(2.00001+1.99998)/2;
cout
Are you going to make videos on bit masking??