Skip to content

Instantly share code, notes, and snippets.

@samarthsewlani
Created February 22, 2021 08:08
Show Gist options
  • Save samarthsewlani/7f20ead30c2e4519971af966b814bb39 to your computer and use it in GitHub Desktop.
Save samarthsewlani/7f20ead30c2e4519971af966b814bb39 to your computer and use it in GitHub Desktop.
Strange Counter HackerRank Solution
def strangeCounter(t):
end,size,cycle=3,3,1
while end<t:
size=2*size
end+=size
cycle+=1
return end-t+1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment