Max Consecutive Ones III - Leetcode 1004 - Sliding Window (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
Video Description
Master Data Structures & Algorithms for FREE at https://AlgoMap.io/ Code solutions in Python, Java, C++ and JS for this can be found at my GitHub repo here: https://github.com/gahogg/Leetcode-Solutions/blob/main/ Complete DSA Pathway Zero to Hero: https://www.youtube.com/playlist?list=PLKYEe2WisBTFEr6laH5bR2J19j7sl5O8R Please check my playlists for free DSA problem solutions: https://www.youtube.com/playlist?list=PLKYEe2WisBTGq9T0wPulXz1otUsVeOGey https://www.youtube.com/playlist?list=PLKYEe2WisBTFlP0RlwfwPrdkvHrcTBUg- https://www.youtube.com/playlist?list=PLKYEe2WisBTEK8_GVXySX9aDWBHk5fGwQ https://www.youtube.com/playlist?list=PLKYEe2WisBTFZH-p9jgAOwtHy9_LGI28W https://www.youtube.com/playlist?list=PLKYEe2WisBTH7I9sCPjSZCs-iBAH4ybmS https://youtube.com/playlist?list=PLKYEe2WisBTH601scI_A008gm34oARlIp&si=DnCpq_RiFkObYn7p https://www.youtube.com/playlist?list=PLKYEe2WisBTF21RGRtZfGGolpHmca_d3N https://www.youtube.com/playlist?list=PLKYEe2WisBTH48RzVCL_LQrGW-ahPY44S https://www.youtube.com/playlist?list=PLKYEe2WisBTHcWHAGWvKJuVMu5ElMA18M https://www.youtube.com/playlist?list=PLKYEe2WisBTEY7eJBW7W-jbxlXCGb928P https://www.youtube.com/playlist?list=PLKYEe2WisBTHCmJ6IfEMjg8o--Bvfc5gt https://www.youtube.com/playlist?list=PLKYEe2WisBTFw-XWc-kwS3dkQeeSmvpg5 My Data Science & ML YouTube Playlist: https://youtube.com/playlist?list=PLKYEe2WisBTECZ8mZCfFxzrBBuGrS1Gfu&si=hspEoaBIyVLV_TyC Learn Python and Data Science FASTER at https://mlnow.ai :) Support the content: https://www.youtube.com/channel/UCJublDh2UsiIKsAE1553miw/join Follow me on Instagram: https://www.instagram.com/greghogg5/ Connect with me on LinkedIn: https://www.linkedin.com/in/greghogg/ Follow me on TikTok: https://www.tiktok.com/@greghogg5 Coursera Plus: https://imp.i384100.net/P0E3J6 My Favorite Courses: Data Structures & Algorithms: - UCalifornia San Diego DSA: https://imp.i384100.net/LP31oV - Stanford Algorithms: https://imp.i384100.net/vNBoxd - Python Data Structures: https://imp.i384100.net/NkZn47 - Meta Coding Interview Prep: https://imp.i384100.net/Y96rBJ Python: - UMichigan Python for Everybody: https://imp.i384100.net/QOLM73 - Python Mastery from MLNOW.ai: https://mlnow.ai/course-material/python/ - Google IT Automation w/ Python: https://imp.i384100.net/5g6Xyj Web Dev / Full Stack: - Meta Front-End Developer: https://imp.i384100.net/q4Jemy - IBM Full Stack Developer: https://imp.i384100.net/Gj9dMn - Meta Back-End Developer: https://imp.i384100.net/xkW0r5 - John Hopkins HTML, CSS & JS: https://imp.i384100.net/QyoRAA - IBM DevOps: https://imp.i384100.net/kjd2r0 Cloud Development: - AWS Fundamentals: https://imp.i384100.net/anqBjZ - GCP Cloud Engineer: https://imp.i384100.net/g1jvqB - Microsoft Azure Fundamentals: https://imp.i384100.net/EKm5O4 Game Development: - Michigan State Unity Development: https://imp.i384100.net/6eOBnr - UColorado C++ for Unreal Engine: https://www.coursera.org/specializations/cplusplusunrealgamedevelopment SQL & Data Science: - SQL by MLNOW.ai: https://mlnow.ai/course-material/sql/ - Python for Data Science by MLNOW.ai: https://mlnow.ai/course-material/datascience/ - Google Data Analytics: https://imp.i384100.net/1rkWAR - IBM Data Science: https://imp.i384100.net/P0ZRL6 - IBM Data Engineer: https://imp.i384100.net/4PbZyZ Machine Learning & AI: - ML Mastery at MLNOW.ai: https://mlnow.ai/course-material/ml/ - ML w/ Andrew Ng: https://www.coursera.org/specializations/machine-learning-introduction - Deep Learning w/ Andrew Ng: https://imp.i384100.net/a1kjJj
Coding Mastery Essentials
AI-recommended products based on this video

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

Logitech K400 Plus Wireless Touch TV Keyboard With Easy Media Control and Built-in Touchpad, HTPC Keyboard for PC-connected TV, Windows, Android, Chrome OS, Laptop, Tablet - Black

Dell 24 Monitor - SE2425HM - 23.8-inch Full HD (1920x1080) 16:9 100Hz Display, IPS Panel, 16.70 Million Colors, Anti-Glare, 1 HDMI / 1 VGA Port, TÜV Rheinland 3-Star*, Comfortview Plus - Black

Dell S2425HS Monitor - 23.8 Inch, FHD (1920x1080) Display, 100Hz Refresh Rate 1500:1 Contrast Ratio, TÜV Rheinland Eye Comfort 4 Star, Integrated 2x5W Speaker, Height/Tilt/Swivel/Pivot - Ash White

USB C Docking Station Dual Monitor for Dell Hp,15-in-1 Laptop Docking Station 3 Monitors USB C Hub with Dual 4K HDMI,8K DP,Button,PD Charging,Ethernet,6 USB A&C,SD/TF, Audio USB-C Multiport Adapter

Dell 24 Monitor - P2425H EPEAT

TP-Link AC1300 USB WiFi Adapter (Archer T3U) - 2.4G/5G Dual Band Wireless Network Adapter for PC Desktop, MU-MIMO WiFi Dongle, USB 3.0, Supports Windows 11/10/8.1/8/7/XP, Mac OS 10.9-10.14

TP-Link AC1300 High Gain WiFi USB Adapter (Archer T4U)- Dual Band Wireless Network Adapter for Desktop with 2.4GHz/5GHz High Gain Antennas, MU-MIMO, Support Windows 10/8.1/8/7/XP, Mac OS

OWC 64GB DDR5 4800 PC5-38400 CL40 2Rx4 288-pin 1.1V ECC Registered RDIMM Memory RAM Module Upgrade Compatible with Dell PowerEdge R660XS R760XS

OWC 64GB DDR5 4800 PC5-38400 CL40 2Rx4 288-pin 1.1V ECC Registered RDIMM Memory RAM Module Upgrade Compatible with Dell PowerEdge XE9680

OWC 64GB DDR5 4800 PC5-38400 CL40 2Rx4 288-pin 1.1V ECC Registered RDIMM Memory RAM Module Upgrade Compatible with Dell PowerEdge R6625 R760 R7615 R7625

OWC 64GB DDR5 4800 PC5-38400 CL40 2Rx4 288-pin 1.1V ECC Registered RDIMM Memory RAM Module Upgrade Compatible with Dell PowerEdge HS5610 HS5620

Corsair RM1000e Fully Modular Low-Noise ATX Power Supply - Dual EPS12V Connectors - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Modern Standby Support - Black

Corsair RM1200x Shift Fully Modular ATX Power Supply - Modular Side Interface - ATX 3.1 & PCIe 5.1 Compliant - Zero RPM Fan Mode - 105°C-Rated Capacitors - 80 Plus Gold Efficiency - Black, 1200W

Corsair RM1200e (2023) Fully Modular Low-Noise ATX Power Supply with 12V-2x6 Cable – ATX 3.1 & PCIe 5.1 Compliant, Cybenetics Platinum Efficiency, 105°C-Rated Capacitors, Modern Standby Mode – Black

Corsair HX1200i (2025) Fully Modular Ultra-Low Noise ATX Power Supply with 12V-2x6 Cable – ATX 3.1 & PCIe 5.1 Compliant, Cybenetics Platinum Efficiency, Fluid Dynamic Bearing Fan – Black
![SAMSUNG 870 EVO SATA SSD 500GB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E500B/AM [Canada Version]](https://m.media-amazon.com/images/I/911ujeCkGfL._AC_UL960_FMwebp_QL65_.jpg)
SAMSUNG 870 EVO SATA SSD 500GB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E500B/AM [Canada Version]
![SAMSUNG 870 EVO SATA III SSD 4TB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E4T0B/AM [Canada Version]](https://m.media-amazon.com/images/I/71W2nK7LUrL._AC_UL960_FMwebp_QL65_.jpg)
SAMSUNG 870 EVO SATA III SSD 4TB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E4T0B/AM [Canada Version]

Samsung 990 EVO Plus - 4TB PCIe Gen4. X4, Gen5. X2 NVMe 2.0 - M.2 Internal SSD, Speed Up to 7,250 MBs, Upgrade Storage for PC-Laptops, HMB Technology and Intelligent Turbowrite (MZ-V9S4T0B/AM)
![SAMSUNG EVO Select Micro SD-Memory-Card + Adapter, 128GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME128SA/AM) [Canada Version]](https://m.media-amazon.com/images/I/71lzXt4djxL._AC_UY654_FMwebp_QL65_.jpg)
SAMSUNG EVO Select Micro SD-Memory-Card + Adapter, 128GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME128SA/AM) [Canada Version]




