Комментарии:
Thank you ! i feel bad because i tried to solve it using math but couldn't figure out :/
ОтветитьSir why we take initial time taking 3
ОтветитьI solved this question with brute froce method but some test cases failed due to compilation time error. Just want to know who u guys solve such problems with mathematical approach.
ОтветитьHello, thank you
Another solution without loop (js)
function strangeCounter(t) {
return 2*(3*Math.pow(2, Math.floor(Math.log2((t+2)/3))))-t-2
}
i think explaination part is not a good way,u should explain it in a detail way(14-20min) atleast
ОтветитьHi. Thankyou for your video solutions to Hackerrank problems. New to the coding community. This helps a lot!
ОтветитьHow do you know that for every cycle time will be returned like time-t+1
Ответитьwhy i am unable to think like this
I am feeling demotivated.