3007. Maximum Number That Sum of the Prices Is Less Than or Equal to K | Weekly Leetcode 380

  Рет қаралды 1,063

codingMohan

codingMohan

Күн бұрын

Пікірлер: 8
@trishulcurtis1810
@trishulcurtis1810 9 ай бұрын
very intuitive! nice
@janviarora3199
@janviarora3199 9 ай бұрын
Can you please explain how did you take the upper bound as 64*1e15?
@harishankarkarthik3570
@harishankarkarthik3570 9 ай бұрын
I think the bruteforce solution has O(ulog(u)) time complexity, because binary representation is log(u) length.
@codingmohan
@codingmohan 9 ай бұрын
We are also iterating over every numbers from 1 to X right.
@hemanthijjurouthu3677
@hemanthijjurouthu3677 9 ай бұрын
Awesome explanation sir
@ECBvamsi
@ECBvamsi 9 ай бұрын
Sir can you tell why the below code is not working i think this time complexity is lesser then your code if not give me any suggestions to modify the code int count=0; int ans=1; while(count
@codingmohan
@codingmohan 9 ай бұрын
Can you help understand the intuition of your solution - "Why you think the solution should work?". Also, in this kind of situations, the best thing is to run your code on a simple test case (maybe 8 bit number) and figure out a case where your code is giving incorrect result (you can compare it with any working solution). That way you can better understand if there is a flaw in the logic or your implementation itself. Further if there is a logical flaw, it will help you understand what you actually missed and you'll be able to retain that for a longer duration.
@ECBvamsi
@ECBvamsi 9 ай бұрын
@@codingmohan SIR LIKE I WAS COUNTING BITS UPTO LIMIT OF COUNT
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 25 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,7 МЛН
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,8 МЛН
3276. Select Cells in Grid With Maximum Score | Weekly Leetcode 413
36:39
Harder Than It Seems? 5 Minute Timer in C++
20:10
The Cherno
Рет қаралды 189 М.
Characters, Symbols and the Unicode Miracle - Computerphile
9:37
Computerphile
Рет қаралды 2 МЛН
The Oldest Unsolved Problem in Math
31:33
Veritasium
Рет қаралды 11 МЛН
3251. Find the Count of Monotonic Pairs II | Weekly Leetcode 410
33:04
Maxwell's Equations - The Ultimate Beginner's Guide
32:58
Up and Atom
Рет қаралды 54 М.
Go Has Exceptions??
16:58
ThePrimeTime
Рет қаралды 66 М.
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 25 МЛН