The best VPN 2024

The Best VPS 2024

The Best C# Book

Codility BinaryGap Solution

Spread the love

HackerRank Non-Divisible Subset Solution

HackerRank Flatland Space Station Solution

def solution(N): cnt = 0 result = 0 found_one = False i = N while i: if i & 1 == 1: if (found_one == False): found_one = True else: result = max(result,cnt) cnt = 0 else: cnt += 1 i = 1 return result

Codility Distinct Solution

This entry was posted inCodilityCoding ChallengePython. Bookmark thepermalink.

Codility CountSemiprimes Solution

The solution is straight-forward! Use of binary shift.

If you enjoyed this post, then make sure you subscribe to my Newsletter and/or Feed.

HackerRank Save the Prisoner! Solution

expected worst-case time complexity isO(log(N));

expected worst-case space complexity is O(1)

onCodility Distinct Solution

onCodility BinaryGap Solution

onCodility SqlSegmentsSum Kalium 2015 Solution

Find longest sequence of zeros in binary representation of an integer.

HackerRank Kangaroo Solution

Leave a Comment