Leetcode - Island Perimeter (Python)

preview_player
Показать описание
July 2020 Leetcode Challenge
Leetcode - Island Perimeter
Рекомендации по теме
Комментарии
Автор

i agree! the DFS helper method is like the swiss army knife for all these challenges!

janmichaelaustria
Автор

I like how you described this and explained what you were doing at each point! I'm still learning and this helps me understand DFS in practical settings a lot.

I tried your solution on leetcode and it said I exceeded time limit, but I think that limit was artificial on leetcode's part. I'll keep this video in mind in future practice questions anyway!

marksama
Автор

Hey Tim, I always have this question: why are we referring the row as N and the column as M? Isn't M for rows and N for columns the usual convention in math?

pinhao
Автор

Hello, I was just wondering if you could explain the point of returning 1 in the dfs method?

alvinly
Автор

A really great way to use DFS to solve this! Thanks for the explaination!

elegentt
join shbcf.ru