how to solve graph problems - Search