Graph problem practice intermediate