the first bruteforce solution will always give TLE because start is only incrementing when digit does not contain "9" . So the while loop will never terminate isn't it ?
I really couldn't understand the log part. Can you help me explaining it a little bit detail?😕😕 I didn't understood base 9 base 10, the relation of this to problem. Thank you
the first bruteforce solution will always give TLE because start is only incrementing when digit does not contain "9" . So the while loop will never terminate isn't it ?
Nope, start
I really couldn't understand the log part. Can you help me explaining it a little bit detail?😕😕 I didn't understood base 9 base 10, the relation of this to problem. Thank you
Your linked in profile in not available!!!!!!!
Hello Kunal,
Lol.. thanks for mentioning that , copy paste messed it up ... I have updated the links and thanks for the sub 🤝
Bro iam watching these videos after 6 months how can I get ur 30 days videos
can you help with this code in C++
vector v;
while(N)
{
v.push_back(N%9);
N /= 9;
}
long long ans = 0;
for(int i=v.size()-1;i>=0;i--)
ans = ans*10+v[i];
return ans;
Hello kalyan ,
This code works but you are using additional vector memory . You can do this in 0(1) space .
@@kalyanchowdhury2240 thank you
@@kalyanchowdhury2240
while(N)
{
v.push_back(N%9);
N /= 9;
}
what this will do
@@prabhattiwari5964 Do dry run with any example..
Where is today's code?
Hey , these are being published on geeks for geeks youtube channel .
And pls continue till day_30 :):)
Sure
What is Day1 problem?
Hello Devendra ,
I couldn't exactly recall the name but it was an easy problem related to array index manipulation .
Geek and his classmates
@@nupurgarg2892 thanks Nupur