Загрузка...

Leetcode Hard Problem 1970 Last Day Where You Can Still Cross - Interesting Matrix Problem

If you find this video helpful, please 'Like' & 'Subscribe'.
This is really helpful for the channel and also motivates me to do more of such good videos.
Leetcode Hard Problem 1970 Last Day Where You Can Still Cross

Problem Description:

There is a 1-based binary matrix where 0 represents land and 1 represents water. You are given integers row and col representing the number of rows and columns in the matrix, respectively.

Initially on day 0, the entire matrix is land. However, each day a new cell becomes flooded with water. You are given a 1-based 2D array cells, where cells[i] = [ri, ci] represents that on the ith day, the cell on the rith row and cith column (1-based coordinates) will be covered with water (i.e., changed to 1).

You want to find the last day that it is possible to walk from the top to the bottom by only walking on land cells. You can start from any cell in the top row and end at any cell in the bottom row. You can only travel in the four cardinal directions (left, right, up, and down).

Return the last day where it is possible to walk from the top to the bottom by only walking on land cells.

Problem Link :
https://leetcode.com/problems/last-day-where-you-can-still-cross/

Youtube channel: https://www.youtube.com/channel/UCrvpRH4lSRjp2T6btl0lf4w

https://github.com/maksrane100/leetcode_solutions

#coding #softwareengineer #Leetcode #Algorithm #DataStructure #Java #programmer #tech #software #codinglife #Preparation
#interview #programminglife #programmingisfun #leetcode1970

Видео Leetcode Hard Problem 1970 Last Day Where You Can Still Cross - Interesting Matrix Problem канала AlgorithmicIQ
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять