Longest Subarray Sum Equals K | Interview Essential | Prefix Sum

Nikhil Lohia October 23, 2025
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

Boost Coding Interview Prep

AI-recommended products based on this video

Loading...
Expo Dry Erase Markers, Whiteboard Markers with Low Odour Ink, Chisel Tip, Assorted Colours, 4 Count

Expo Dry Erase Markers, Whiteboard Markers with Low Odour Ink, Chisel Tip, Assorted Colours, 4 Count

(42,242)
$5.48
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
Dry Erase Markers Low Odor Fine Whiteboard Markers Thin Box of 12,10 Colors
Best Seller

Dry Erase Markers Low Odor Fine Whiteboard Markers Thin Box of 12,10 Colors

(46,489)
$9.98
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
Cmokifuly GMK67 65% Mechanical Keyboard Kit Tri-Mode South-Facing RGB LED for 3/5pin Switches,66 Keys+1 Knob Hotswap Socket PCB Gasket Mounted Plate Gaming DIY Keyboard Kit (White)

Cmokifuly GMK67 65% Mechanical Keyboard Kit Tri-Mode South-Facing RGB LED for 3/5pin Switches,66 Keys+1 Knob Hotswap Socket PCB Gasket Mounted Plate Gaming DIY Keyboard Kit (White)

(72)
$160.90
FREE delivery Aug 12 - 14Only 9 left in stock.
Loading...
5 Pcs Adult Keyboard Clicker Toys, Portable Mechanical Keyboard Keychain Toy, Decompression Toys, Funny Cube Key Button Stress Relief for Adults Present to Relief Pass Time

5 Pcs Adult Keyboard Clicker Toys, Portable Mechanical Keyboard Keychain Toy, Decompression Toys, Funny Cube Key Button Stress Relief for Adults Present to Relief Pass Time

(0)
$4.99
$9.99 delivery Jun 19 - Jul 3
Loading...
TMKB 60% Mechanical Gaming Keyboard, Brown Tactile Switch, LED Backlight, Anti-Ghosting, Detachable USB-C, Double-Shot Keycaps, 61 Keys, Wired, White

TMKB 60% Mechanical Gaming Keyboard, Brown Tactile Switch, LED Backlight, Anti-Ghosting, Detachable USB-C, Double-Shot Keycaps, 61 Keys, Wired, White

(35)
$39.99
PrimeFREE delivery Sat, Jun 14
Loading...
CHARM FOCUS Stereo Headset Adapter, Audio Mic Headphone Adapter for Xbox One, Xbox Series X|S and Elite Controller, Adjust Audio Balance (Game Sound & Voice Chat), Not Bluetooth Compatible

CHARM FOCUS Stereo Headset Adapter, Audio Mic Headphone Adapter for Xbox One, Xbox Series X|S and Elite Controller, Adjust Audio Balance (Game Sound & Voice Chat), Not Bluetooth Compatible

(79)
$34.99
FREE delivery Sun, Aug 24 on your first order
Loading...
Mind Reader Monitor Stand, Height Adjustable, Ventilated Laptop Riser, Office, Metal, 36.8L x 23.5W x 14H cm, Black

Mind Reader Monitor Stand, Height Adjustable, Ventilated Laptop Riser, Office, Metal, 36.8L x 23.5W x 14H cm, Black

(95)
$46.30$46.13
FREE delivery Mon, Aug 11
Loading...
Seventable L Shaped Computer Desk with Drawers 47.2 inch,Gaming Desk with Power Outlets & LED Lights,Reversible Office Desk with Storage Shelves,Corner Desk with Monitor Stand for Home Office White

Seventable L Shaped Computer Desk with Drawers 47.2 inch,Gaming Desk with Power Outlets & LED Lights,Reversible Office Desk with Storage Shelves,Corner Desk with Monitor Stand for Home Office White

(597)
$129.99
FREE delivery Thu, Jun 26
50+ bought in past month
Loading...
Seventable L Shaped Computer Desk with Power Outlets & LED Lights, 44.6"Small Home Office Desk with 3 Fabric Drawers, Reversible Gaming Desk with Storage Shelves, Corner Desk with Monitor Stand, White

Seventable L Shaped Computer Desk with Power Outlets & LED Lights, 44.6"Small Home Office Desk with 3 Fabric Drawers, Reversible Gaming Desk with Storage Shelves, Corner Desk with Monitor Stand, White

(100)
$119.99
FREE delivery Thu, Jun 26
Loading...
ODK Gaming Desk with Led Lights & Power Outlet, 48 Inch Gaming Computer Desk with Storage Shelves, PC Desk with Monitor Stand, Gamer Desk Table for Home Office, Black

ODK Gaming Desk with Led Lights & Power Outlet, 48 Inch Gaming Computer Desk with Storage Shelves, PC Desk with Monitor Stand, Gamer Desk Table for Home Office, Black

(1,001)
$129.99
50+ bought in past month
Loading...
Lemorele Docking Station Dual Monitor, 6 in 1 USB C Hub Multiport Adapter w/2 HDMI 4K, 5Gbps USB3.0 & 2 USB2.0, 100W PD Charging - USB C Dock for Laptop Dell/HP/MacBook/Surface - Plug and Play
Best Seller

Lemorele Docking Station Dual Monitor, 6 in 1 USB C Hub Multiport Adapter w/2 HDMI 4K, 5Gbps USB3.0 & 2 USB2.0, 100W PD Charging - USB C Dock for Laptop Dell/HP/MacBook/Surface - Plug and Play

(1,822)
$27.19
Prime
1K+ bought in past month
Loading...
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

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

(1,359)
$67.98
FREE delivery Sun, Aug 24
100+ bought in past month
Loading...
InnoView Laptop Screen Extender 15.6" Dual Portable Monitors 1080P FHD Stacked Folding Triple Monitor HDMI USB-C Portable Dual Monitor for Laptop Windows Mac (No Driver Needed)

InnoView Laptop Screen Extender 15.6" Dual Portable Monitors 1080P FHD Stacked Folding Triple Monitor HDMI USB-C Portable Dual Monitor for Laptop Windows Mac (No Driver Needed)

(605)
$379.99
FREE delivery Mon, Aug 11
Loading...
APILDELLA 14’’ Triple Laptop Screen Extender, 1080P FHD Portable Dual Monitor for Laptop USB C HDMI, Plug-Play Monitor Extender for Mac/Windows, Fit 13”-17.3” Laptops

APILDELLA 14’’ Triple Laptop Screen Extender, 1080P FHD Portable Dual Monitor for Laptop USB C HDMI, Plug-Play Monitor Extender for Mac/Windows, Fit 13”-17.3” Laptops

(696)
$449.15
FREE delivery Aug 13 - 19
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