Grid based problems can be very tricky, as there can be a lot of path between connected components. In this problem two servers are said to be connected if they share a same column or a row. Watch the video to understand how you can take advantage of this fact and arrive at a time efficient solution.
Actual Problem: [ Ссылка ]
Chapters:
00:00 - Intro
01:06 - Problem Statement and Description
05:52 - Brute Force Approach
08:47 - Time efficient Solution
11:46 - Dry-run of Code
14::41 - Final Thoughts
📚 Links to topics I talk about in the video:
Brute Force Solution: [ Ссылка ]
LeetCode Problems: [ Ссылка ]
What is Big O?: [ Ссылка ]
Other medium difficulty problems: [ Ссылка ]
📘 A text based explanation is available at: [ Ссылка ]
Code on Github: [ Ссылка ]
Test-cases on Github: [ Ссылка ]
📖 Reference Books:
Starting Learn to Code: [ Ссылка ]
Favorite book to understand algorithms: [ Ссылка ]
Favorite book for data structures: [ Ссылка ]
Get started for interview preparation: [ Ссылка ]
🔗 To see more videos like this, you can show your support on: [ Ссылка ]
🎥 My Recording Gear:
Recording Light: [ Ссылка ]
Microphone: [ Ссылка ]
Recording Camera: [ Ссылка ]
Tablet to sketch and draw: [ Ссылка ]
Surface Pen: [ Ссылка ]
Laptop to edit videos: [ Ссылка ]
💻 Get Social 💻
Follow on Facebook at: [ Ссылка ]
Follow on Twitter at: [ Ссылка ]
Follow on Tumblr at: [ Ссылка ]
Subscribe to RSS feeds: [ Ссылка ]
Join fan mail: [ Ссылка ]
#leetcode #programming #interview
![](https://s2.save4k.ru/pic/Mx8s7W_adpk/maxresdefault.jpg)