Max Consecutive Ones (LeetCode 485) | Full Solution w/ Kadane's Algorithm | Visuals and Animations

Nikhil Lohia • April 29, 2024
Video Thumbnail
Nikhil Lohia Logo

Nikhil Lohia

View Channel

About

I want to share with you my knowledge, that I have gained all my life. I like to see every task in your day to day life as an interesting problem to solve, and if you can understand the requirements, solving for it can become somewhat intuitive. I try to explore certain aspects of day to day life and how I can make them easier for you. This involves daily hacks, tutorials, innovations, new discoveries, experiences and all the stuff I find amusing. As a software engineer myself, I also believe that good problem solving skills can help you overcome most of the barriers in life. Programming is one of them. If you know how to approach a problem, writing a code for it in any language could be a very typical task. With this channel I aim to focus on the way to solve a problem efficiently rather than just its implementation.

You May Also Like

Coding Essentials for LeetCode Fans

AI-recommended products based on this video

Loading...
ARZOPA Portable Monitor, 16.1" FHD 1080P Kickstand 100% sRGB High Color Gamut Portable Laptop Monitor IPS Eye Care Screen for High-end Office & Entertainment - Z1C

ARZOPA Portable Monitor, 16.1" FHD 1080P Kickstand 100% sRGB High Color Gamut Portable Laptop Monitor IPS Eye Care Screen for High-end Office & Entertainment - Z1C

(2,728)
$129.99
FREE delivery Tue, Aug 12
100+ bought in past month
Loading...
Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Noise-Cancelling Mic and LED Display, Built-in Mic for Clear Calls, Waterproof Design for Sports

Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Noise-Cancelling Mic and LED Display, Built-in Mic for Clear Calls, Waterproof Design for Sports

(8)
$39.99
FREE delivery Tue, Nov 4
Loading...
Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Powerful Bass, Built-in Noise-Cancelling Mic for Clear Calls, LED Display, 36H Playtime, IPX5 Waterproof Design for Sports

Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Powerful Bass, Built-in Noise-Cancelling Mic for Clear Calls, LED Display, 36H Playtime, IPX5 Waterproof Design for Sports

(40)
$39.99
FREE delivery Thu, Nov 13
Loading...
VIVO 81cm Desk Converter, K Series, Height Adjustable Sit to Stand Riser, Dual Monitor and Laptop Workstation with Wide Keyboard Tray, Black, DESK-V000K

VIVO 81cm Desk Converter, K Series, Height Adjustable Sit to Stand Riser, Dual Monitor and Laptop Workstation with Wide Keyboard Tray, Black, DESK-V000K

(13,797)
$139.99$103.20
FREE delivery Thu, Jun 26
200+ bought in past month
Loading...
LG UltraWide 34WP65C-B 34 Inch 21:9 Curved FreeSync 1ms 160 Hz WQHD(3440 x 1440) Gaming Monitor, Black

LG UltraWide 34WP65C-B 34 Inch 21:9 Curved FreeSync 1ms 160 Hz WQHD(3440 x 1440) Gaming Monitor, Black

(2,271)
419.98
PrimeFREE delivery Saturday, June 14
50+ bought in past month
Loading...
llano RGB Laptop Cooling Pad with Powerful Turbofan Gaming Cooler Radiator with Infinitely Variable Speed, Touch Control, LCD Screen, 3-Port USB Hub, Seal Foam for Notebook Computer 15-19in

llano RGB Laptop Cooling Pad with Powerful Turbofan Gaming Cooler Radiator with Infinitely Variable Speed, Touch Control, LCD Screen, 3-Port USB Hub, Seal Foam for Notebook Computer 15-19in

(1,404)
$129.99
Prime
200+ bought in past month
Loading...
HP 17.3" FHD Laptop, AMD Ryzen 5 5500U, 16GB RAM, 1TB SSD, AMD Radeon Graphics, Numeric Keyboard, 720p HD Webcam, WiFi, Windows 11 Pro, Silver, 32GB Hotface USB Card

HP 17.3" FHD Laptop, AMD Ryzen 5 5500U, 16GB RAM, 1TB SSD, AMD Radeon Graphics, Numeric Keyboard, 720p HD Webcam, WiFi, Windows 11 Pro, Silver, 32GB Hotface USB Card

(13)
$899.00
FREE delivery Wed, Jun 18
Loading...
Dell Latitude 3450 3000 14" Business Laptop, Intel 10 Core i5-1335U (Beats i7-1270P), 32GB RAM, 1TB NVMe, WiFi 6E + BT, HD Webcam, RJ-45, Win 11 Pro -Gray

Dell Latitude 3450 3000 14" Business Laptop, Intel 10 Core i5-1335U (Beats i7-1270P), 32GB RAM, 1TB NVMe, WiFi 6E + BT, HD Webcam, RJ-45, Win 11 Pro -Gray

(2)
$3,663.75$1,197.91
FREE delivery Jun 23 - Jul 3Only 3 left in stock.
Loading...
Lenovo IdeaPad 3i 15.6" FHD Touchscreen Laptop, Intel Gen 11th i3-1115G4, 16GB RAM, 512GB PCIe SSD, Intel UHD Graphics, Numeric Keypad, HD Webcam, WiFi 6, Win 11 Pro, Grey, 32GB Hotface USB Card

Lenovo IdeaPad 3i 15.6" FHD Touchscreen Laptop, Intel Gen 11th i3-1115G4, 16GB RAM, 512GB PCIe SSD, Intel UHD Graphics, Numeric Keypad, HD Webcam, WiFi 6, Win 11 Pro, Grey, 32GB Hotface USB Card

(3)
$599.00
FREE delivery Sun, Jun 22
Loading...
Lenovo IdeaPad 3 14" Full HD Business Laptop, Intel i5-1135G7, 36GB RAM, 2.28TB Storage (2TB SSD+288GB Docking Station Set), Intel Iris Xe Graphics, WiFi 6, Webcam, Windows 11 Pro, Platinum Grey

Lenovo IdeaPad 3 14" Full HD Business Laptop, Intel i5-1135G7, 36GB RAM, 2.28TB Storage (2TB SSD+288GB Docking Station Set), Intel Iris Xe Graphics, WiFi 6, Webcam, Windows 11 Pro, Platinum Grey

(34)
$849.00
FREE delivery Sun, Jun 22
Loading...
SwissGear Cecil 5505 Laptop Backpack, Charcoal, 18-Inch

SwissGear Cecil 5505 Laptop Backpack, Charcoal, 18-Inch

(1,127)
$85.05
FREE delivery Thu, Jun 19
Loading...
HOMIEE HOMIEE 15.6-Inch Laptop Backpack, High-Capacity Backpack for Men Women USB Charging Port Travel/Business/College Backpack, Blue

HOMIEE HOMIEE 15.6-Inch Laptop Backpack, High-Capacity Backpack for Men Women USB Charging Port Travel/Business/College Backpack, Blue

(1,409)
$37.99
PrimeFREE delivery Sat, Jun 14
Loading...
Lumesner Laptop Backpack for Men,Water Resistant Travel Laptop Backpack with USB Charging Port,Anti Theft College School Backpack

Lumesner Laptop Backpack for Men,Water Resistant Travel Laptop Backpack with USB Charging Port,Anti Theft College School Backpack

(1,670)
$31.99
FREE delivery Sat, Jun 14 on your first order
Loading...
MDODO MDODO Laptop Backpack for Women,Travel Backpack with Laptop Compartment,Casual Daypack College Bookbag Computer Work Backpack15.6Inch, Black

MDODO MDODO Laptop Backpack for Women,Travel Backpack with Laptop Compartment,Casual Daypack College Bookbag Computer Work Backpack15.6Inch, Black

(99)
$45.99
PrimeFREE delivery Sat, Jun 14