LeetCode Number of Islands Solution Explained - Java

preview_player
Показать описание


Preparing For Your Coding Interviews? Use These Resources
————————————————————

Other Social Media
----------------------------------------------

Show Support
------------------------------------------------------------------------------

#coding #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

Good solution. However this implementation is DFS based and not BFS since you make recursive call for each adjacent node and in turn their children instead of processing all adjacent nodes and then process the same of their children.

yodleyuuuu
Автор

This question can be generalized as "Find connected components in graph".

ManishKumar-rzub
Автор

Nick your explanations are awesome, short but descriptive. I have one request, could you please add the time and space complexity calculation part in this coding videos. This would be really helpful for people like us preparing for interviews.

anirbansarkar
Автор

This method seems like DFS instead of BFS to me. In a BFS method, should we use a queue to store the surrounding positions, instead of using recursion?

huashao
Автор

You will be the last video series I'll watch before my final interview.... So far I'm loving the explanations😁😁😁

sbonelo
Автор

Would it be i-1 //up and i+1 //down? Same result just comments reversed.

shaneh
Автор

Pretty mesmerizing explanation and u genuinely managed to break down some multifaceted parts into manageable ones

NEO-wlox
Автор

I was wandering for Leetcode solutions, and I found this place, you just explained very well.. thank you Nick.. Doing great !!

vivekkr.mishra
Автор

I really needed these tutorials. Its my initial phase of problem solving and after couple of years of the experience i understand now how important problem solving is.
I am sure your videos gonna help me a lot. thanks for creating big playlist.

KaranSingh-wydf
Автор

Dude you are awesome i saw three videos prior to this and was still confused, you made it simple :) Thank you

eijaz
Автор

Love your videos and explanations! getting back to these problems after years, and you make it so easy to understand.

foramdalal
Автор

Hi, do you plan to come up with a video for the Leetcode problem The Maze anytime soon? There are so many solutions out there, but I don't quite get why the solutions are the way they are. I am not even sure I understand the problem completely.

skh
Автор

Finally somebody has done it in java. Thank you so much for this. Please keep going :)

tindo
Автор

//Up and
//Down
Comments are interchanged!

dattatreyapujar
Автор

Thanks Nick, I solved this in a similar way but using a visited set which I stored in a hash table. I much prefer your approach of changing 1's to 0's.

RussellSmith-nvje
Автор

your videos are always very crisp and clear ..Thanks !!

raginibhadani
Автор

you are a genius man! thanks! I spent hours trying to resolve and the solution was easy!

fabianrico
Автор

Thank you for what you do nick. You help millions of people coding to help land a career. I appreciate you ♥️

christopherapuan
Автор

This question came in my Walmart Interview. I had 15 mins to solve. Thank you so much

poojabhatia
Автор

Amazing explanation Nick, Thanks a lot!!

mahalakshmithirumurthy
welcome to shbcf.ru