Merge Intervals (LeetCode 56) | Full Solution with diagrams and visuals | Interview Essential

Nikhil Lohia • April 10, 2023
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

Essential Drone Upgrades

AI-recommended products based on this video

Loading...
DJI Mic Mini (2 TX + 1 RX), Detail-Rich Audio, Wireless Lavalier Microphone for Camera/Android, 2-Person Vlog, Team Production
Best Seller

DJI Mic Mini (2 TX + 1 RX), Detail-Rich Audio, Wireless Lavalier Microphone for Camera/Android, 2-Person Vlog, Team Production

(59)
$99.00
FREE delivery Tue, Oct 7
500+ bought in past month
Loading...
DJI Mic Mini (2 TX + 1 RX), Detail-Rich Audio, Wireless Lavalier Microphone for Camera/Android, 2-Person Vlog, Team Production
Best Seller

DJI Mic Mini (2 TX + 1 RX), Detail-Rich Audio, Wireless Lavalier Microphone for Camera/Android, 2-Person Vlog, Team Production

(59)
$99.00
FREE delivery Tue, Oct 7
500+ bought in past month
Loading...
iPhone Charger Cord Lightning Cable (Apple MFi Certified) 6/6/10ft 3 Pack iPhone Cable Fast Charging Long Apple Charger Cable for iPhone 13 13 Pro 12 Pro 11 SE Max XS XR X, iPad Mini Air, iPod, AirPod

iPhone Charger Cord Lightning Cable (Apple MFi Certified) 6/6/10ft 3 Pack iPhone Cable Fast Charging Long Apple Charger Cable for iPhone 13 13 Pro 12 Pro 11 SE Max XS XR X, iPad Mini Air, iPod, AirPod

(4,371)
$9.99
FREE delivery Sat, Sep 20 on your first order
6K+ bought in past month
Loading...
Mini Gaming PC i9-13900F with GeForce RTX4070, 64G DDR5 RAM 2T SSD Game Desktop Computer, Windows 11 Pro, WiFi6E BT5.3, Optical, 1* HDMI 3* DP, 8K, Four Display for Gaming/Design

Mini Gaming PC i9-13900F with GeForce RTX4070, 64G DDR5 RAM 2T SSD Game Desktop Computer, Windows 11 Pro, WiFi6E BT5.3, Optical, 1* HDMI 3* DP, 8K, Four Display for Gaming/Design

(2)
$3,362.00
FREE delivery Aug 12 - 15
Loading...
Amztabler Small Standing Desk Adjustable Height, Mobile Stand Up Desk with Wheels, 32 Inch Portable Rolling Desks for Walking Pad Treadmill White1

Amztabler Small Standing Desk Adjustable Height, Mobile Stand Up Desk with Wheels, 32 Inch Portable Rolling Desks for Walking Pad Treadmill White1

(1,495)
$89.99
FREE delivery Thu, Jun 26
400+ bought in past month
Loading...
Nasal Strips for Snoring, Extra Strength Nose Strips Breathing, Nose Tape for Sports and Sleep, Anti Snoring Help Stop and Nasal Congestion Relief 30Pcs Vol. 1 Black

Nasal Strips for Snoring, Extra Strength Nose Strips Breathing, Nose Tape for Sports and Sleep, Anti Snoring Help Stop and Nasal Congestion Relief 30Pcs Vol. 1 Black

(10,477)
$17.98
FREE delivery Sat, Sep 13 on your first order
Loading...
Toenail Fungus Treatment Extra Strength - Nail Fungus Treatment Extra Strength for Thick, Yellow, Discolored, Broken and Ingrown Nails, Ultimate Fungus Nail Treatment for Toenail & Fingernail Trono(30ML)
Best Seller

Toenail Fungus Treatment Extra Strength - Nail Fungus Treatment Extra Strength for Thick, Yellow, Discolored, Broken and Ingrown Nails, Ultimate Fungus Nail Treatment for Toenail & Fingernail Trono(30ML)

(7,458)
$24.69
FREE delivery Mon, Aug 25 on your first order
3K+ bought in past month
Loading...
TP-Link AV1000 Powerline Ethernet Adapter(TL-PA7017P KIT) - Gigabit Port, Plug and Play, Extra Power Socket for Additional Devices, Ideal for Smart TV

TP-Link AV1000 Powerline Ethernet Adapter(TL-PA7017P KIT) - Gigabit Port, Plug and Play, Extra Power Socket for Additional Devices, Ideal for Smart TV

(17,610)
$64.99$51.48
PrimeFREE delivery Sat, Jun 14
100+ bought in past month
Loading...
Hydrocolloid Roll for Wound Care - Cut-to-Size, Extra Large Hydrocolloid Patch Bandages with Self-Adhesive, Ultra Absorbent, Flexible & Waterproof, First Aid Kit Essential (2in*16ft)

Hydrocolloid Roll for Wound Care - Cut-to-Size, Extra Large Hydrocolloid Patch Bandages with Self-Adhesive, Ultra Absorbent, Flexible & Waterproof, First Aid Kit Essential (2in*16ft)

(76)
$36.99$23.98
FREE delivery Sun, Sep 7
4K+ bought in past month
Loading...
MP3 Player with Bluetooth Music Player: Olycism MP3 Player for Kids with 64GB Memory Card, Hi-Fi Sound, Bluetooth 5.3, Voice Recorder & FM Radio 0.21 inch Touch Screen Portable Digital Music White

MP3 Player with Bluetooth Music Player: Olycism MP3 Player for Kids with 64GB Memory Card, Hi-Fi Sound, Bluetooth 5.3, Voice Recorder & FM Radio 0.21 inch Touch Screen Portable Digital Music White

(61)
$39.99
PrimeFREE delivery Sat, Jun 14
Loading...
KOOTION 128GB Micro SD Card 2 Pack Micro SDXC UHS-I High Speed up to 90MB/s TF Card 128GB Card Memory U3,A1,V30, Full HD Video for Drone/Smartphone/Camera/Dash Cam/PC/Tablet

KOOTION 128GB Micro SD Card 2 Pack Micro SDXC UHS-I High Speed up to 90MB/s TF Card 128GB Card Memory U3,A1,V30, Full HD Video for Drone/Smartphone/Camera/Dash Cam/PC/Tablet

(1,370)
$20.89
FREE delivery Sun, Aug 10 on your first order
300+ bought in past month
Loading...
KOOTION 5-Pack 128GB Micro SD Card Class 10 Micro-SDXC Memory Card UHS-I, High Speed Flash TF Card for Security Camera/Smartphone/Drone/Dash Cam/Tablet/PC, C10, U1, 128GB 5Pack

KOOTION 5-Pack 128GB Micro SD Card Class 10 Micro-SDXC Memory Card UHS-I, High Speed Flash TF Card for Security Camera/Smartphone/Drone/Dash Cam/Tablet/PC, C10, U1, 128GB 5Pack

(6,435)
$45.75
FREE delivery Sun, Aug 10
100+ bought in past month
Loading...
KOOTION 5-Pack 64 GB Micro SD Card Class 10 Micro-SDXC Memory Card UHS-I, High Speed Flash TF Card for Security Camera/Smartphone/Drone/Dash Cam/Tablet/PC, C10, U1, 64 GB 5pack

KOOTION 5-Pack 64 GB Micro SD Card Class 10 Micro-SDXC Memory Card UHS-I, High Speed Flash TF Card for Security Camera/Smartphone/Drone/Dash Cam/Tablet/PC, C10, U1, 64 GB 5pack

(6,435)
$22.87
FREE delivery Sun, Aug 10 on your first order
400+ bought in past month
Loading...
LEGO Creator 3 in 1 Flatbed Truck with Helicopter Toy, Transforms from Flatbed Truck Toy to Propeller Plane to Hot Rod and SUV Car Toys, Gift Idea for Boys and Girls Ages 7 Years Old and Up, 31146
Amazon's Choice

LEGO Creator 3 in 1 Flatbed Truck with Helicopter Toy, Transforms from Flatbed Truck Toy to Propeller Plane to Hot Rod and SUV Car Toys, Gift Idea for Boys and Girls Ages 7 Years Old and Up, 31146

(2,877)
$21.22
FREE delivery Sat, Jun 14 on your first order
2K+ bought in past month
Loading...
LEGO Technic Bush Plane Toy - Buildable Airplane Toy for Kids, Boys and Girls, Ages 8+ - Model Airplane Gift with Spinning Propeller, 4-Cylinder Piston Engine, and More - 42198

LEGO Technic Bush Plane Toy - Buildable Airplane Toy for Kids, Boys and Girls, Ages 8+ - Model Airplane Gift with Spinning Propeller, 4-Cylinder Piston Engine, and More - 42198

(149)
$24.98
FREE delivery Sat, Jun 14 on your first order
700+ bought in past month
Loading...
Hard Carrying Case for Meta Quest 3S, VR Gaming Headset and Touch Controllers Accessories Travel Case, Small Hard Shell Storage Case for Oculus Quest 3S/Quest 3/Vision Pro, Gray

Hard Carrying Case for Meta Quest 3S, VR Gaming Headset and Touch Controllers Accessories Travel Case, Small Hard Shell Storage Case for Oculus Quest 3S/Quest 3/Vision Pro, Gray

(131)
$29.99
100+ bought in past month
Loading...
Large Carrying Case for Meta Quest 3/Quest 3S, Hard Travel Case Compatible with Battery Head Strap, Controllers and Other Accessories, Portable Travel Bag for Oculus Quest 3S/Quest 3, Gray

Large Carrying Case for Meta Quest 3/Quest 3S, Hard Travel Case Compatible with Battery Head Strap, Controllers and Other Accessories, Portable Travel Bag for Oculus Quest 3S/Quest 3, Gray

(39)
$45.99
FREE delivery Tue, Jun 17
100+ bought in past month
Loading...
STARTRC GAMES Hard Carrying Case for Nintendo Switch 2, Professional Deluxe IP67 Waterproof, Soft Lining Hard Travel Case for Nintendo Switch 2 Console Pro Controller & Accessories (Black)

STARTRC GAMES Hard Carrying Case for Nintendo Switch 2, Professional Deluxe IP67 Waterproof, Soft Lining Hard Travel Case for Nintendo Switch 2 Console Pro Controller & Accessories (Black)

(2)
$65.99
PrimeFREE delivery Sun, Jun 15
Loading...
Deruitu Carrying Case for Nintendo Switch/OLED Model Case, Portable Travel Protective Hard Messenger Bag Soft Lining 18 Games for Switch Console Pro Controller & Accessories Black

Deruitu Carrying Case for Nintendo Switch/OLED Model Case, Portable Travel Protective Hard Messenger Bag Soft Lining 18 Games for Switch Console Pro Controller & Accessories Black

(1,637)
$27.99
FREE delivery Sun, Jun 15 on your first order
Loading...
SmallRig ZV-E1 Camera Baseplate for Sony ZV-E1, Built-in Cold Shoe Mount and QR Plate (for Arca) Quick Switch Between Tripod and Stabilizer for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro - 4314

SmallRig ZV-E1 Camera Baseplate for Sony ZV-E1, Built-in Cold Shoe Mount and QR Plate (for Arca) Quick Switch Between Tripod and Stabilizer for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro - 4314

(3)
$44.99
FREE delivery Thu, Jun 19
Loading...
SmallRig Baseplate for Sony Alpha 6700, Bottom Mount Plate Built-in Quick Release Plate for Arca, Supporting Quick Switch Between Tripod and Stabilizer (for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro) - 4338

SmallRig Baseplate for Sony Alpha 6700, Bottom Mount Plate Built-in Quick Release Plate for Arca, Supporting Quick Switch Between Tripod and Stabilizer (for DJI RS 2 / RSC 2 / RS 3 / RS 3 Pro) - 4338

(85)
$38.24
FREE delivery Thu, Jun 19
Loading...
NEEWER a6700 L Plate Compatible with Sony Alpha 6700, Quick Switch Aluminum Extendable Side Plate & Anti Twist Baseplate Compatible with Arca Swiss QR System DJI RS 2 RSC 2 RS 3 Pro Gimbals, CA048

NEEWER a6700 L Plate Compatible with Sony Alpha 6700, Quick Switch Aluminum Extendable Side Plate & Anti Twist Baseplate Compatible with Arca Swiss QR System DJI RS 2 RSC 2 RS 3 Pro Gimbals, CA048

(24)
$25.99
FREE delivery Thu, Jun 19 on your first order
Loading...
DJI Mic Mini (2 TX + 1 RX), Detail-Rich Audio, Wireless Lavalier Microphone for Camera/Android, 2-Person Vlog, Team Production
Best Seller

DJI Mic Mini (2 TX + 1 RX), Detail-Rich Audio, Wireless Lavalier Microphone for Camera/Android, 2-Person Vlog, Team Production

(59)
$99.00
FREE delivery Tue, Oct 7
500+ bought in past month