Number of Islands | LeetCode 200 | Programming Tutorials

Programming Tutorials April 17, 2020
Video Thumbnail
Programming Tutorials Logo

Programming Tutorials

View Channel

About

In this channel, I discuss tutorials related to programming, data structure and java. You can contact me through this form - https://webrewrite.com/contact-us/

Video Description

In this tutorial, I have explained Number of Islands LeetCode solution using Java. How to count number of islands using DFS (Depth First Search). Number of Islands BFS Approach - https://youtu.be/S1u806G_JuE Number of Islands Java Code - https://webrewrite.com/number-of-islands/ LeetCode 30 Day Challenge PlayList - https://www.youtube.com/watch?v=-I1pUv57WG8&list=PLUg9hRlm7gxT8mrwa_648iC8Ah42E0W1o Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. In this tutorial, I have discussed how we can solve this problem using DFS. This problem is the day 17 challenge of LeetCode 30 day challenge. Website - https://webrewrite.com/ Paypal - https://www.paypal.me/programmingtutorials

You May Also Like

Master Coding: Must-Have Tech Essentials

AI-recommended products based on this video

Loading...
Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black
Best Seller

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

(17,871)
$27.98$22.38
FREE delivery Tue, Oct 14 on your first order
500+ bought in past month
Loading...
Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

(21,223)
$44.98
FREE delivery Tue, Oct 14
1K+ bought in past month
Loading...
TP-Link USB C To Ethernet Adapter (UE300C) - J45 To USB C [Thunderbolt 3/4 Compatible] Type-C Gigabit Ethernet LAN Network Adapter, Compatible With Apple MacBook Pro 2017-2023, MacBook Air, And More

TP-Link USB C To Ethernet Adapter (UE300C) - J45 To USB C [Thunderbolt 3/4 Compatible] Type-C Gigabit Ethernet LAN Network Adapter, Compatible With Apple MacBook Pro 2017-2023, MacBook Air, And More

(11,192)
$12.99$10.39
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
Laptop Sleeve Case 11–14 Inch MacBook Air MacBook Pro Surface Laptop Dell XPS 13 HP Envy Pavilion Lenovo Yoga Slim IdeaPad Acer Swift Chromebook Samsung Galaxy Book Shockproof Leather Bag Colour Blue

Laptop Sleeve Case 11–14 Inch MacBook Air MacBook Pro Surface Laptop Dell XPS 13 HP Envy Pavilion Lenovo Yoga Slim IdeaPad Acer Swift Chromebook Samsung Galaxy Book Shockproof Leather Bag Colour Blue

(98)
$81.45
Loading...
Gumdrop ProTech Case for Dell New XPS 13 Plus 9320 Laptop- Slim Lightweight Case with Energy Displacement Protection, Non-Skid Rubber Feet and Frosted Exterior for Bumps and Drops (Black)

Gumdrop ProTech Case for Dell New XPS 13 Plus 9320 Laptop- Slim Lightweight Case with Energy Displacement Protection, Non-Skid Rubber Feet and Frosted Exterior for Bumps and Drops (Black)

(49)
$109.43$108.34
FREE delivery Aug 11 - 13
Loading...
65W 45W USB C Laptop Charger Compatible with Dell Latitude 5420 5430 5520 5530 7340 7430 Inspiron 14 16 XPS 13 Chromebook 3100 Dell Computer Type C Fast Charging AC Adapter Power Cord

65W 45W USB C Laptop Charger Compatible with Dell Latitude 5420 5430 5520 5530 7340 7430 Inspiron 14 16 XPS 13 Chromebook 3100 Dell Computer Type C Fast Charging AC Adapter Power Cord

(7)
$19.99
FREE delivery Sun, Aug 24 on your first order
Loading...
45W 65W AC Adapter Laptop Charger for Dell Inspiron 15 14 13 17 3000 5000 7000 Series 5558 5559 Charger Latitude E6440 E6430 3520 3420 XPS 13 14 9333 9350 Notebook Dell Computer Power Supply Cord

45W 65W AC Adapter Laptop Charger for Dell Inspiron 15 14 13 17 3000 5000 7000 Series 5558 5559 Charger Latitude E6440 E6430 3520 3420 XPS 13 14 9333 9350 Notebook Dell Computer Power Supply Cord

(52)
$13.99
FREE delivery Sun, Aug 24 on your first order
100+ bought in past month
Loading...
Bose QuietComfort Wireless Noise Cancelling Headphones, Bluetooth Over Ear Headphones with Up to 24 Hours of Battery Life, Moonlight Grey - Limited Edition

Bose QuietComfort Wireless Noise Cancelling Headphones, Bluetooth Over Ear Headphones with Up to 24 Hours of Battery Life, Moonlight Grey - Limited Edition

(12,251)
$269.00
FREE delivery Tue, Oct 14
Loading...
Anker 332 USB-C Hub (5-in-1) with 4K HDMI Display, 5Gbps - and 2 5Gbps USB-A Data Ports and for MacBook Pro, MacBook Air, Dell XPS, Lenovo Thinkpad, HP Laptops and More

Anker 332 USB-C Hub (5-in-1) with 4K HDMI Display, 5Gbps - and 2 5Gbps USB-A Data Ports and for MacBook Pro, MacBook Air, Dell XPS, Lenovo Thinkpad, HP Laptops and More

(11,639)
$23.99
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
tomtoc 360 Protective Laptop Sleeve for 15.6 Inch Acer Aspire 1/3/5 15 Slim Laptop, 15.6-16 Inch ASUS Strix G16/G15, HP Pavilion 15, Lenovo Ideapad 3 Laptop, 15.6 Inch Dell Samsung Notebook Ultrabook

tomtoc 360 Protective Laptop Sleeve for 15.6 Inch Acer Aspire 1/3/5 15 Slim Laptop, 15.6-16 Inch ASUS Strix G16/G15, HP Pavilion 15, Lenovo Ideapad 3 Laptop, 15.6 Inch Dell Samsung Notebook Ultrabook

(3,132)
$37.59
FREE delivery Sat, Jun 21
Loading...
100W 90W USB-C Charger Type-C Adapter for Lenovo Thinkpad Carbon x1 5th 6th Gen, IdeaPad 13" 720 Y400 Y500 P580 P500, Yoga 370 X280 X390 910 920 Power Cord GX20M33579 4X20M26268

100W 90W USB-C Charger Type-C Adapter for Lenovo Thinkpad Carbon x1 5th 6th Gen, IdeaPad 13" 720 Y400 Y500 P580 P500, Yoga 370 X280 X390 910 920 Power Cord GX20M33579 4X20M26268

(43)
$24.99
FREE delivery Sun, Jun 22 on your first order
Loading...
65W USB C Laptop Charger for Lenovo Thinkpad X1 Carbon T470 T480 T490 T590 E580 E590 E595 Yoga IdeaPad Chromebook Power Supply Adapter Cord 20V 3.25A

65W USB C Laptop Charger for Lenovo Thinkpad X1 Carbon T470 T480 T490 T590 E580 E590 E595 Yoga IdeaPad Chromebook Power Supply Adapter Cord 20V 3.25A

(5)
$19.99
FREE delivery Tue, Jun 17 on your first order
50+ bought in past month
Loading...
45W 65W Laptop Charger for Lenovo Thinkpad X1 Carbon T460 T470 T470S T440 T540 X260 X240 X270 G40 G50 G50-80 E560 E450, Yoga 2 11/2 Pro/ 11s 13 Flex 2 2-15 Ideapad 300 500 700 Power Supply Cord

45W 65W Laptop Charger for Lenovo Thinkpad X1 Carbon T460 T470 T470S T440 T540 X260 X240 X270 G40 G50 G50-80 E560 E450, Yoga 2 11/2 Pro/ 11s 13 Flex 2 2-15 Ideapad 300 500 700 Power Supply Cord

(46)
$19.99
FREE delivery Sun, Jun 22 on your first order
Loading...
65W USB C for Lenovo Laptop Charger for Lenovo Thinkpad/Chromebook/Ideapad/Yoga Series-USB C Laptop Charger for Lenovo T14 Thinkpad T480 T490 Yoga 7i 9i Thinkpad X1 Carbon

65W USB C for Lenovo Laptop Charger for Lenovo Thinkpad/Chromebook/Ideapad/Yoga Series-USB C Laptop Charger for Lenovo T14 Thinkpad T480 T490 Yoga 7i 9i Thinkpad X1 Carbon

(11)
$24.09
FREE delivery Sun, Jun 22 on your first order
500+ bought in past month
Loading...
Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

(16,830)
$47.98$38.38
FREE delivery Sat, Nov 15
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...
Metapen Air 8 Apple Pencil for iPad 2018-2025, 20H Battry Life, 2Min Fast Charging, Palm Rejection, Stylus Pen for iPad 11/10/9/8/7/6th, iPad Pro 12.9/11/13“M4, iPad Air 3/4/5/6/M2/M3, iPad mini 5/6

Metapen Air 8 Apple Pencil for iPad 2018-2025, 20H Battry Life, 2Min Fast Charging, Palm Rejection, Stylus Pen for iPad 11/10/9/8/7/6th, iPad Pro 12.9/11/13“M4, iPad Air 3/4/5/6/M2/M3, iPad mini 5/6

(1,985)
$14.22
FREE delivery Tue, Sep 9 on your first order
1K+ bought in past month
Loading...
Metapen A8 Pencil for iPad 2018-2025, 4Min Fast Charge, Palm Rejection, Tilt Sensitivity Stylus Pen for iPad 10th 11/9/8/7/6, iPad Accessories for Pro 12.9/11/13", iPad Air 3/4/5/M2/M3, iPad mini 5/6

Metapen A8 Pencil for iPad 2018-2025, 4Min Fast Charge, Palm Rejection, Tilt Sensitivity Stylus Pen for iPad 10th 11/9/8/7/6, iPad Accessories for Pro 12.9/11/13", iPad Air 3/4/5/M2/M3, iPad mini 5/6

(35,048)
$24.98
FREE delivery Wed, Aug 20 on your first order
4K+ bought in past month
Loading...
for iPhone 16/15 Pro Max Charger, 20W Fast Charging USB C Charger Block Wall Power Adapter + 6FT USB-C Cable for iPhone 16 Pro Max Plus 16e, iPhone 15 Pro Max, iPad Pro 12.9/11/13 inch, Air 4/5

for iPhone 16/15 Pro Max Charger, 20W Fast Charging USB C Charger Block Wall Power Adapter + 6FT USB-C Cable for iPhone 16 Pro Max Plus 16e, iPhone 15 Pro Max, iPad Pro 12.9/11/13 inch, Air 4/5

(3,858)
$19.99
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
45W Super Fast Charger USBC Charger, 2Pack 10FT Samsung Charger Fast Charging Cord Cable& Samsung Type C Charger Block for Galaxy S25 S24 S23 S22 S21 Ultra/Plus, Tab S10 S9 S8 S7,iPad,Android Phone

45W Super Fast Charger USBC Charger, 2Pack 10FT Samsung Charger Fast Charging Cord Cable& Samsung Type C Charger Block for Galaxy S25 S24 S23 S22 S21 Ultra/Plus, Tab S10 S9 S8 S7,iPad,Android Phone

(52)
$22.79
FREE delivery Fri, Oct 3 on your first order
1K+ bought in past month