House Robber - Leetcode 198 - Dynamic Programming (Python)
Greg Hogg
View ChannelAbout
Hey there - my name is Greg Hogg, a statistics alumni from the University of Waterloo in Ontario, Canada. I'm an ex-AI researcher who's published medical papers with Deepbreathe.ai, a startup that continues to win awards in the US military due to my and other's research. I still do AI contracts with companies like Nvidia, HP, and other big names today. I'm most known as a popular coding teacher online for interview skills like DSA and System Design, with over 150 million organic views and 650k+ followers in the space. My day job is running MLNOW Inc (which owns Algomap.io), where I help busy individuals get into the world's best software engineering roles at companies like FAANG. My company's website Algomap has over 75,000 users and a personalized live program tailored to cracking FAANG.
Latest Posts
iPhone 13 Upgrade Must-Haves
AI-recommended products based on this video
![VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung](https://m.media-amazon.com/images/I/71bHSP1cRkL._AC_UL960_FMwebp_QL65_.jpg)
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung
![iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad](https://m.media-amazon.com/images/I/517jTqwo1nL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad
![iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods](https://m.media-amazon.com/images/I/71xZOlUELbL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

SURPHY Silicone Case Compatible with iPhone 13 Case 6.1 inch (2021), with Camera Protection Liquid Silicone Soft Gel Rubber Phone Case Cover with Microfiber Lining (Pink) Global Recycled Standard

JETech Silicone Case for iPhone 13 6.1-Inch, Silky-Soft Touch Full-Body Protective Phone Case, Shockproof Cover with Microfiber Lining (Black)

GuaGua Case for iPhone 13 6.1 Inch Liquid Silicone Soft Gel Rubber Slim Thin Microfiber Lining Cushion Texture Cover Shockproof Protective Anti-Scratch Phone Case for iPhone 13 2021 Yellow

JETech Case for iPhone 13 Pro 6.1-Inch, Non-Yellowing Shockproof Phone Bumper Cover, Anti-Scratch Clear Back (Clear)

Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods

4-in-1 Wireless Magnetic Power Bank 10800mAh Portable Charger with iWatch Charger, QC4.0+20W PD Fast Charging USB C Battery Pack for Magsafe, iPhone 16/15/14/13/12 Series, Apple Watch etc. (White)

eazpower for Magsafe Power Bank 10000mAh, Magnetic Battery Pack Wireless, 20W PD Fast Charging, Compact Portable Charger with Built-in Cables and Stand for iPhone 16/15/14/13/12/ Apple Watch/Airpods

Wireless Charging Case for AirPods Pro 1st / 2nd Gen with Type-C Charging Port, Compatible with AirPod Pro 2nd Generation Replacement Case, with Blue-Tooth Sync Button, No Earbuds

Cleaner Kit for Airpods Pro 1 2 3 Multi-Function Cleaning Pen with Soft Brush Flocking Sponge for Bluetooth Earphones Case Cleaning Tools White

Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Wireless Charger, 3 in 1 Charging Station, Fast Charging Station Foldable Charging Stand, Wireless Charging Station for Multiple Devices, Compatible with lPhone 17/16/15/14/13 Pro Max Airpods Watch

soundcore P31i by Anker, Real-Time Adaptive Noise Cancelling, Hi-Res Sound, Translation Earbuds, 50H Playtime, Wireless Earbuds, Bluetooth Earphones, Spatial Audio, Fast Charging, IP55 ClimatePartner certified
![[ 3+3 Pack] LK 3Pack iPhone 13 Screen Protector 6.1-inch with 3Pack Camera Lens Protector, Anti-Scratch Easy-Installation,9H Hardness, HD Tempered Glass Film Global Recycled Standard](https://m.media-amazon.com/images/I/714PYxCQxbL._AC_UL960_FMwebp_QL65_.jpg)
[ 3+3 Pack] LK 3Pack iPhone 13 Screen Protector 6.1-inch with 3Pack Camera Lens Protector, Anti-Scratch Easy-Installation,9H Hardness, HD Tempered Glass Film Global Recycled Standard
![MRGLAS 2025 Upgraded Magsafe Car Mount Vacuum Suction Magnetic Phone Holder Car, 360° Foldable Adjustable Suction Cup Phone Stand [89+LBS Suction & 2800gf Magnetic] for Car Accessories iPhone17/16](https://m.media-amazon.com/images/I/71UbeT7ccLL._AC_UL960_FMwebp_QL65_.jpg)
MRGLAS 2025 Upgraded Magsafe Car Mount Vacuum Suction Magnetic Phone Holder Car, 360° Foldable Adjustable Suction Cup Phone Stand [89+LBS Suction & 2800gf Magnetic] for Car Accessories iPhone17/16

for Magsafe Car Mount【20 Strong Magnets 】Magnetic Phone Holder for Car Phone Holder Mount Dash【360°】Cell Phone Mount for Car Accessories,Car Mount for iPhone 16 Pro Max 15 14 13 12 Plus MagSafe Cases
![[ 3+3 Pack] LK 3Pack iPhone 13 Screen Protector 6.1-inch with 3Pack Camera Lens Protector, Anti-Scratch Easy-Installation,9H Hardness, HD Tempered Glass Film Global Recycled Standard](https://m.media-amazon.com/images/I/714PYxCQxbL._AC_UL960_FMwebp_QL65_.jpg)
[ 3+3 Pack] LK 3Pack iPhone 13 Screen Protector 6.1-inch with 3Pack Camera Lens Protector, Anti-Scratch Easy-Installation,9H Hardness, HD Tempered Glass Film Global Recycled Standard

for Magsafe Car Mount【20 Strong Magnets 】Magnetic Phone Holder for Car Phone Holder Mount Dash【360°】Cell Phone Mount for Car Accessories,Car Mount for iPhone 16 Pro Max 15 14 13 12 Plus MagSafe Cases

Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods
![VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung](https://m.media-amazon.com/images/I/71bHSP1cRkL._AC_UL960_FMwebp_QL65_.jpg)
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung
![iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad](https://m.media-amazon.com/images/I/517jTqwo1nL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad
![iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods](https://m.media-amazon.com/images/I/71xZOlUELbL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods






















