Тёмный

164 - Hackerland Radio Transmitters | Search | Hackerrank Solution | Python 

Hackers Realm
Подписаться 24 тыс.
Просмотров 4 тыс.
50% 1

Опубликовано:

 

11 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@gabrielfuente4475
@gabrielfuente4475 2 года назад
Thank you very much for this solution, I was following a simillar, but more complex approach, which wasn't working.
@HackersRealm
@HackersRealm 2 года назад
Glad it's helpful!!!
@kbcah
@kbcah Год назад
Strange that it doesn't need to set n = len(x).
@josephcarter5661
@josephcarter5661 Год назад
Hard agree, I looked at this and was baffled that it worked with an undeclared and uninitialized "n". Can someone explain whats happening with this?
@kbcah
@kbcah Год назад
@@josephcarter5661 I solved this question, if you want I can send it to you.
@MrKRABBB
@MrKRABBB 5 месяцев назад
n is defined in the starter code below. it is also explained in the question that n would be provided as part of the input
@shivangagrawal2923
@shivangagrawal2923 2 года назад
Excellent solution man, Can you tell if there are houses all over from 1 to n but the given array represents that we can install the tower only on that houses. This means we have to cover the full range from 1 to max house by minimum tower
@HackersRealm
@HackersRealm 2 года назад
yes you're correct, if it's not possible we can return -1