Skip to content

Instantly share code, notes, and snippets.

@cipri7329
cipri7329 / BinaryLongestZeroSequence.java
Created July 28, 2016 11:44
Find longest sequence of zeros in binary representation of an integer.
/**
*
Find longest sequence of zeros in binary representation of an integer.
*/
public class BinaryLongestZeroSequence {
/**
* worst-case time complexity is O(log(N));
* number of bits = log(N) ==> worst case is O(N)
* @param N