Google Interview Question

bitwise operations and dfs algorithm