Number of Islands | LeetCode 200 | Programming Tutorials
Programming Tutorials
View ChannelAbout
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/
Latest Posts
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
Master Coding: Must-Have Tech Essentials
AI-recommended products based on this video

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

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
![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](https://m.media-amazon.com/images/I/418xZkoG-RL._AC_UY654_FMwebp_QL65_.jpg)
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

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

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)

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

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

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

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

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

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

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

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

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

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

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)

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

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

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 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

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













![[Java] Leetcode 694. Number of Distinct Islands [Search #2]](https://imgz.pc97.com/?width=500&fit=cover&image=https://i.ytimg.com/vi/u617H2WwR5g/hqdefault.jpg)









