70 - Strange Counter | Implementation | Hackerrank Solution | Python

70 - Strange Counter | Implementation | Hackerrank Solution | Python

Hackers Realm

4 года назад

4,639 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Arnold
Arnold - 19.10.2021 23:24

Thank you ! i feel bad because i tried to solve it using math but couldn't figure out :/

Ответить
Satyam Rastogi
Satyam Rastogi - 27.04.2021 20:57

Sir why we take initial time taking 3

Ответить
Rushiket more
Rushiket more - 14.04.2021 10:26

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.

Ответить
برامج الرقمنة - RAKMANA SOFT
برامج الرقمنة - RAKMANA SOFT - 15.12.2020 18:44

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
}

Ответить
Rounak
Rounak - 12.10.2020 01:55

i think explaination part is not a good way,u should explain it in a detail way(14-20min) atleast

Ответить
Muskan Jain
Muskan Jain - 10.09.2020 20:38

Hi. Thankyou for your video solutions to Hackerrank problems. New to the coding community. This helps a lot!

Ответить
TABISH SIDDIQUI
TABISH SIDDIQUI - 05.08.2020 15:54

How do you know that for every cycle time will be returned like time-t+1

Ответить
Shreshth Singh
Shreshth Singh - 26.07.2020 17:00

why i am unable to think like this
I am feeling demotivated.

Ответить