This problem is literally the same as koko eating bananas problem, yet you took the time to explain it separately. Kudos for the hardwork
@ajayramola9386
Жыл бұрын
just watched the prev question vid and solved this question by myself only thanks striver absolutely the best DSA course
@akworld2739
10 ай бұрын
😁same here
@syedfazil2998
9 ай бұрын
Same
@sriyuvaraani8834
8 ай бұрын
yeah!!
@AdityaKumar-be7hx
Жыл бұрын
Here's an easy way to find the ceil while doing division: return (x+y-1)/y; If we want to avoid overflow with x+y then simply doing 1+(x-1)/y will work too
@syedfazil2998
9 ай бұрын
Can you explain this please?
@bishalpaul18
5 ай бұрын
Literally found the same thing in codeforces blog article
@crazybro4383
4 ай бұрын
int maxx(vector nums){ int n = nums.size(); int ans = 0; for(int i=0; i
@Satyendra_Prakash17
Ай бұрын
solved in just one go without a single error with intuition from previous videos. Love you striver for such amazing content..
@sujalgupta6100
3 ай бұрын
solved by myself, thanks a ton!!!!!!!!!!!!!!!!!!!!!!!!
@Josuke217
Ай бұрын
Your explanation is really good, I actually regret wasting 3.5 months: March , April, May and June. Babbar has explained binary search in a very poor manner. I couldn't solve most questions. My friends told me to learn it from this channel but looking at the playlist length , I avoided it . Totally my fault, and here I am able to atleast think and come up with a solution. Now I understand why people say learn from Striver.
@jatinukey4062
18 күн бұрын
Even my friends are saying, striver is slow and you should follow love babbar, he explains solution in less time. I said I will take extra 3-4 days than you but I will follow this man series!!
@pizzagamingyt9712
Жыл бұрын
Striver Explanation is so smooth and easy to understand ..❣
@udaykulkarni5639
5 ай бұрын
1 min 50 seconds into the video and I know how to solve this question. lol. What a guy!! people like you are true 💎. hats off.
@adityarajvermaa
Жыл бұрын
i coded it by myself...understanding the previous videos .......thank you bhai.........my thinking capacity is increasing
@user-nu7sr1vw3t
6 ай бұрын
SAME BRO
@sakshinaruka3440
Жыл бұрын
Understood :), Thank so much , i always faced difficulty in when i should take high=mid-1 or high=mid . You teach all the ques with the same pattern. This helped me a lot
@akuma_168
11 ай бұрын
hey I want to know how to figure out when to decide high= mid-1 or mid. In which video he explained this concept.
@saswatrath4646
4 ай бұрын
I saw comments before watching the video, people were able to solve so I got jealous and solved it on my own 😂 thank u striver
@NetajiSaiSuru
25 күн бұрын
Just Following the BS playlist and from 12th video after knowing the question i was able to write Optimal Code Kudoos to Striver🙌
@RajNamdev_19
Ай бұрын
Thanks Bro, Now I am getting Binary Search and able to do by myself ;) Understood;
@Harsh-og5xr
10 ай бұрын
too good bro... after smashing dp playlist im here and with each video my confidence level on BS Q increasing rapidly🔥🔥
@adveshdarvekar7733
Ай бұрын
I solved this problem without seeing the video. Thank you for teaching me so well!
@gajsinghrathore8800
Жыл бұрын
i literraly solved by myself it is same as koko eating bananas ,tank you striver bhaiya for this amazing content,i am paying my internet bills to watch this types of content only
@anshror2583
4 ай бұрын
This is literally same as Koko eating banana well explained brother
@nitinbhatt3635
22 күн бұрын
solve it by myself but watched it again for better understanding
@joeljacob4685
10 ай бұрын
Thanks for the explanation !! I was able to solve the question on my own🙂
@ishangujarathi10
Жыл бұрын
coded it all by myslef!!! thank you soo much for such an amazing playlist!!! following each and every video of yours!!
@pryansh8333
Жыл бұрын
no big deal !! its similar to koko eating bananas.. me n my friends all were able to solve it... Ha Ha Ha !!
@surajs5093
Жыл бұрын
yeah its the same as koko eating bananas just the language is different😁
@crazybro4383
4 ай бұрын
int maxx(vector nums){ int n = nums.size(); int ans = 0; for(int i=0; i
@shamikbhattacharjee7321
Жыл бұрын
Very much similar to the question of Koko eating bananas.(Just my opinion)
@khitijkarmakar
Жыл бұрын
exactly
@user-rf7ri9pw9p
11 ай бұрын
Absolute amazing DSA course thank you able to solve this myself
@hareshnayak7302
4 ай бұрын
Understood,Thanks Stirver for this amazing video.
@maitohpughu5714
Жыл бұрын
*************JAVASCRIPT CODE************* function smallestDivisor(arr, threshold) { let left = 1, right = (ans = Math.max(...arr)); while (left Math.ceil(el / mid)) .reduce((acc, curr) => curr + acc, 0); if (sum
@udatyadeb101
7 ай бұрын
wow! did this one on my own as well! Thanks to you!
@ABCDEFGH-fz5ju
3 ай бұрын
understood thoroughly
@eklavya22k34
7 ай бұрын
Thanks a ton for all the help. Great work. Noble deeds.
@LinhHoang-ml1qo
Ай бұрын
Thank you Striver, you are the best of DSA KZitemr
@cinime
Жыл бұрын
Understood! Wonderful explanation as always, thank you very much for your effort!!
@SumitSingh-dc8pm
8 ай бұрын
Completed this today, thanks again
@user-js1rx8rs9p
4 ай бұрын
its just like a previous one , i did it bro
@user-ti3bd8mp1w
Жыл бұрын
understood Thank you striver for such an amazing explanation
@manavsingh5919
Жыл бұрын
Thank you Striver understood everything
@googleit2490
Жыл бұрын
Understood :) Coded whole code on my own,thanks!!
@aditya8sharma
Жыл бұрын
Please update the CP sheet, to a checklist kind of a sheet, just like you have done with the DSA sheets!
@harshitjaiswal9439
Жыл бұрын
Understood Striver! You are amazing!
@culeforever5408
9 ай бұрын
understood 😇
@soni.himansh
Жыл бұрын
same as Koko Eating Bananas
@VivekKumar-kx2zf
3 ай бұрын
hello striver maybe we can do the binary search from min(arr) to max(arr) that will have less range of binary search and it is also working correctly
@VivekKumar-kx2zf
3 ай бұрын
can someone please reply
@UdayGarg
2 ай бұрын
solved it by myself
@crazymemes4080
14 күн бұрын
LOVE YOU BRO
@garimaarora5311
Жыл бұрын
can we take low=min_element in array rather than we take low=1??
@CodeMode9313
Жыл бұрын
no bcoz...we choose lo and high based upon the values where the dummy_threshold can reach max and min...so if u find the dummy_threshold value by using 1 it will be the maximum u can get but if u find the dummy_threshold using lo then its greater then that of 1 . Along with that hamare question my ek possiblity ye bhi ho sakti hai ki threshold value kaagfi jada di ho toh us case me tum agar max threshold nikali hai toh 1 se hi nikalegi .
@user-or5oz1pk2x
3 ай бұрын
Thanks a lot Striver Bhaiya
@KartikeyTT
2 ай бұрын
ty sir
@user-is6ky7pp2n
2 ай бұрын
Understood !! 😎😎
@cyanideyt9579
6 ай бұрын
The loop that finds the maximum value in the array (maxi) has a time complexity of O(n), where n is the length of the array. The binary search is performed on the range from 1 to maxi. The binary search algorithm has a time complexity of O(log(maxi)), where maxi is the range of possible divisors. Inside the binary search loop, the sumByD function is called, which has a time complexity of O(n). This is because it iterates through the entire array. Therefore, the overall time complexity is O(n) (for finding maxi) + O(log(maxi)) (for binary search) + O(n) (for sumByD) = O(n + log(maxi) + n). Sir, so what's the time complexity of this code? Thank You!!
@Dipanshutripathi2407
10 ай бұрын
Another Hard Problem is made easy here.
@anshpradhan1954
3 ай бұрын
understood brother
@oyeesharme
20 күн бұрын
thanks bhaiya
@AnmolGupta-oj4lm
Жыл бұрын
Understood Very Well!
@lazyemperor5182
Жыл бұрын
Sliding window par small series bhi karwado
@rutujashelke4208
9 күн бұрын
Understood
@arunmahajan1028
9 ай бұрын
we can also start low from array min
@mansisethi8127
8 ай бұрын
I didn't understand why he took the ceil ?
@user-js1rx8rs9p
4 ай бұрын
tq striver
@simply_akh1l
12 күн бұрын
understood
@vinisaxena8916
18 күн бұрын
hi @TakeUForward, I think there is some issue in your portal. Nothing is getting loaded (basically SDE sheet, profile ,progress). I am stuck in middle of my practice as I refer your java code. Please get it resolved ASAP.
@nayankhuman1043
Ай бұрын
Understood :)
@modiji8706
10 ай бұрын
able to solve myself after 3:52
@devanshverma5395
Жыл бұрын
If there are 0s in the array then the Return -1 if n>limit condition will fail
@sarankumaar6009
Жыл бұрын
understood. solved by myself
@YourCodeVerse
8 ай бұрын
Understood✅🔥🔥
@VishalGupta-xw2rp
10 ай бұрын
12:10 Reverse Polarity
@gunjjoshi5687
10 ай бұрын
Thank you.
@senseiAree
10 ай бұрын
Understood ❤
@shubhanshutripathi546
6 ай бұрын
my n>limit but where is n declared timing 15:28 sec
@raghavkansal3765
Жыл бұрын
"understood"
@CodeMode9313
Жыл бұрын
Habibi ye toh lappu sa question hai .....khud hi ban jave .....shukriya
@infinity2creation551
10 ай бұрын
Last 2 videos.. Really related to this question..... Advice = plz watche last 2 videos
@humanity7880
Жыл бұрын
understood!
@girikgarg8
11 ай бұрын
Done
@Gaurav_Tripathi_
9 ай бұрын
Understood..!!
@user-qf6it2em2h
Жыл бұрын
Bhaiyaa I have just passed class 12 and my result of jee is not good enough to get any nits,gftis........so, please answer to my query that what would be better choice for me either joining newton school of technology or scaler school of technology Brand new bs ms programme OR, should taking a drop for cse at NIts,IIITS,Gftis........????.... please give your suggestion🙏🙏🙏🙏🙏 please answer my queries ASAP
@22gauravkumar70
Жыл бұрын
both the above school you mentioned are bullsh@t , pls don't" join either . Go for Thapar or take drop and join IIT,NITS,IIITs .
@crimemastergogo710
7 ай бұрын
###Use float datatype to use ceil function###3 bool poss(int mid,vectorarr,int limit){ for(int i=0;i
@pratikshadhole6694
Жыл бұрын
understood😍
@rohinisharma4043
Жыл бұрын
Hello bhaiya ! i have been following your dsa since a long time ...now-a-days there are a lot of courses that are floating on yt (paid approx 5k or 6k ) each and every youtubers i now from faraz , nishant , anuj apna college everyone is selling their courses that are starting fron july ownwards ...but i know no can beat your level of dsa problem solving ....are u gonna launch any dsa course too ?? ...i trust only u when it comes to dsa ...and dont want to waste money on this courses unless it is yours ... please reply bhaiya are u launching any dsa course ....??
@takeUforward
Жыл бұрын
no
@Abcxyz.24
Жыл бұрын
dont even think of buying their courses. follow him and you are good to go. just gotta have sume discipline and consistency
@vishaljoshi7752
Жыл бұрын
youtube pe sub hai or kya chahiye 300 400 problem deklo na hr topic me se
@MJBZG
Ай бұрын
math version of koko problem
@pihus3498
Жыл бұрын
understood :)
@parthanuj8611
7 ай бұрын
bhai kab khatm hogi ye series
@kiranbisen1794
Жыл бұрын
what is int div?
@jagadeeshp1163
10 ай бұрын
US💯
@saketjaiswal9381
Жыл бұрын
done
@funandfrustration6492
Жыл бұрын
Bro,how much time is needed to practice DSA?
@ganeshmula4508
11 ай бұрын
🙌🙌🙌🙌
@user-zm6ih2vl2g
Жыл бұрын
First view ❤
@snehashisratna9074
9 ай бұрын
bhai ...ap odia ho kya ? i mean ... are you from odisha ?
@vishaljoshi7752
Жыл бұрын
same as koko
@ambaradhikari7425
Жыл бұрын
bro if possible try to solve 2-3 problems in one video like you did for array
@takeUforward
Жыл бұрын
Reduces the search index
@ambaradhikari7425
Жыл бұрын
@@takeUforward okay, I was asking so that you can complete all the remaining ones as early as possible, string linkedlist ,bit manipulations, stack ,queue so many things left and placement season coming so we can cover all the lectures, Ik you have other works but the way you explain concepts I want to study everything from you , if possible please try to cover up all as early as possible .
@pratikshadhole6694
Жыл бұрын
@@ambaradhikari7425 same but individual videos are better for people having less attention span(like me)😅
@ambaradhikari7425
Жыл бұрын
@@pratikshadhole6694 yeah same but videos 3-4 ho ya phir 1-2 , agar problems solve ho raha hai toh koi dhikkat nehi? Btw have you just started doing dsa?
@harshith1424
Жыл бұрын
Consistency ❤❤
@cenacr007
10 ай бұрын
us
@pranshu7592
Жыл бұрын
Bro plz complete this series before july 1
@takeUforward
Жыл бұрын
I will try for sure
@pranshu7592
Жыл бұрын
@@takeUforward ❤️
@harshdhawale2669
Жыл бұрын
First comment
@anonymous.u.s.e.r
Жыл бұрын
woooooo 1st comment 😒😒
@aatirali7696
Жыл бұрын
Understood:) Thank you striver for such a great content ❣❣
@jagadeeshp1163
10 ай бұрын
if you watch koko bananas question this question is a real banana
Пікірлер: 149