Поиск в глубину - DFS
Задачи
https://leetcode.com/problems/number-of-provinces/description/
https://leetcode.com/problems/number-of-islands/description/
https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero/
https://leetcode.com/problems/keys-and-rooms/
https://leetcode.com/problems/minimum-number-of-vertices-to-reach-all-nodes/
https://leetcode.com/problems/find-if-path-exists-in-graph/description/
https://leetcode.com/problems/max-area-of-island/
https://leetcode.com/problems/reachable-nodes-with-restrictions/
https://leetcode.com/problems/find-the-town-judge/description/
https://leetcode.com/problems/maximal-network-rank/description/
https://leetcode.com/problems/island-perimeter/description/
https://leetcode.com/problems/number-of-enclaves/description/