Python: Dominant Cells || Python (Basic) || HackerRank Skills Certifications || Solution

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

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

Thanks bro . Your video helped me and I got a certificate.

pechataudio
Автор

i write the same code but unfortunately, i did not pass the Python(Basic) Skill Verification Test. i didn't understand why?!

chaymabenabdeljelil
Автор

great video bro...but if you add voice hints of what you were doing will be useful

rvenkatprabhu
Автор

Plz explain the problem
I couldn't understand the problem itself

aravinda
Автор

res = 0
for i in range(len(grid)):
for k in range(len(grid[0])):
val = grid[i][k]
flag = 1
for ii in range(max(0, i - 1), min(len(grid), i + 2)):
for kk in range(max(0, k - 1), min(len(grid[0]), k + 2)):
if (ii, kk) != (i, k) and val <= grid[ii][kk]:
flag = 0
break
if flag == 0:
break
else:
res += 1
return res

vikassingh-kfgc