DFSSolver implementation