Fractal Interview Question

Binary to integer conversion. Similar to leet code medium