what’s a good algorithm to solve from here?