AMAZON CODING INTERVIEW - HOUSE ROBBER (LEETCODE)

Publicado em: 07 Junho 2020
no canal de: Erik Toor
199
7

SOCIAL
--------------------------------------------------------------------------
Patreon:   / eriktoor  
Instagram:   / erik_toor  
Youtube (Subscribe): https://www.youtube.com/user/TEDBET62...

Solution Explanation:
First understand the recursive decisions at each level. They boil down to a rob the house at our current iterator and the house 2 houses away or skip the house at our current iterator decision. This would give the top down solution a time and space complexity of O(2^n). By adding memoization we can reduce it to O(n). By making it bottom up and iterating through our houses array with a for loop and memoized array we can solve it in O(n) time and space.

OTHER VIDEOS YOU MIGHT LIKE:
--------------------------------------------------------------------------
GOOGLE INTERVIEW QUESTION - COURSE SCHEDULER II:    • GOOGLE INTERVIEW QUESTION - COURSE SCHEDUL...  
HOW MR. BEAST UPDATES HIS THUMBNAILS IN REAL TIME WITH PYTHON & PILLOW:    • HOW MR. BEAST UPDATES HIS THUMBNAILS IN RE...  


MUSIC
------------------------------------------------------------------
young frontwood:   / xo-bored-lif3  

#amazoninterview #robhouses #leetcode #techinterview


Nesta página do site você pode assistir ao vídeo on-line AMAZON CODING INTERVIEW - HOUSE ROBBER (LEETCODE) duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Erik Toor 07 Junho 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 199 vezes e gostou 7 espectadores. Boa visualização!