DSA coding interview question || Google, Amazon || Data structures and Algorithms #coding

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Find all the cells with value '1', and apply dfs. The number of times dfs will run is the required answer.

Aadesh
Автор

It's like finding no of arrays filled completely with 1 ?

Odin_Borson
Автор

Ummm will do bfs from every one and convert the connected parts to 0 so that we never visit them again.the number of times bfs call will go will gonna to be the answer I think

akarshthakur
join shbcf.ru