WorldQuant Interview Question

Implement a log2(n) method, add unit tests too.