Frage im Vorstellungsgespräch bei Chatham Financial

Develop an algorithm to count islands in a grid. The question can be found on leetcode: https://leetcode.com/problems/number-of-islands/description/

Antwort im Vorstellungsgespräch

Anonym

15. Nov. 2017

Iterate through the grid and when you find an island, perform a DFS for all connected islands.