Add `solveEfficiently` to solve this problem more efficient way.