Biweekly Leetcode Contest 77 | 6054. Escape the Spreading Fire

  Рет қаралды 1,983

codingMohan

codingMohan

2 жыл бұрын

Contest Link - leetcode.com/contest/biweekly...
Problem Link - leetcode.com/contest/biweekly...
Code - leetcode.com/contest/biweekly...
*********************************************************************
Interview Experiences Playlists -
Microsoft - • Microsoft Interview Qu...
Amazon - • Amazon Interview Quest...
D.E.Shaw - • D.E.Shaw Interview Que...
Linkedin - • Linkedin Interview Que...
Facebook - • Facebook (Meta) Interv...
*********************************************************************
Please show support and subscribe if you find the content useful.

Пікірлер: 8
@Ani_86_
@Ani_86_ Жыл бұрын
I never went away disappointed after watching your videos... I always got the right intuition and concept behind every problem explanation video of yours..
@ujjwalagnihotri5001
@ujjwalagnihotri5001 6 ай бұрын
While implementing the check function for binary search , I got WA with DFS and AC with BFS, what could be the reason ? The below DFS function which gives WA private boolean dfs(int mid, int[][] dp, int[][] grid, int r, int c, int n, int m, boolean[][] visited) { if (r == n - 1 && c == m - 1) { return true; } boolean res = false; for (int i = 0; i < 4; ++i) { int nr = r + dx[i], nc = c + dy[i]; if (nr >= 0 && nc >= 0 && nr < n && nc < m && !visited[nr][nc] && grid[nr][nc] != 2) { visited[nr][nc] = true; if (mid + 1 < dp[nr][nc]) { res = res || dfs(mid + 1, dp, grid, nr, nc, n, m, visited); } } } return res; }
@hoyinli7462
@hoyinli7462 2 жыл бұрын
thx for your video, mate! :)
@codingmohan
@codingmohan 2 жыл бұрын
Glad you find it helpful :) Do share it with your friends so that maximum people can get benefitted from it.
@techyguy7776
@techyguy7776 2 жыл бұрын
Great explanation man...but could you switch to Hindi whenever it is little tricky to explain some parts
@codingmohan
@codingmohan 2 жыл бұрын
Thanks for the feedback. I tried keeping it in English because I see some US viewers as well, but I can definitely do otherwise if explanations are not clear. If possible can you please pin-point the exact timestamp from where you start feeling that a Hindi explanation could have been better?
@gladyouseen8160
@gladyouseen8160 2 жыл бұрын
@@codingmohan so T.C is O(m*n log(mn))?
@codingmohan
@codingmohan 2 жыл бұрын
@@gladyouseen8160 Yes. But it is O(m*n*log(MAX_STEPS)), where in this case, MAX_STEPS is 10^9.
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 25 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 49 МЛН
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 43 МЛН
2258. Escape the Spreading Fire (Leetcode Hard)
25:18
Programming Live with Larry
Рет қаралды 2,2 М.
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 855 М.
Magnus Carlsen, Hans Niemann Drama Just Got Much Worse
31:16
GothamChess
Рет қаралды 102 М.
Top Competitive Programmer vs. LeetCode's HARDEST Questions
1:06:25
Colin Galen
Рет қаралды 206 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 159 М.
BREAKING Chess Drama As Niemann Rips Into Magnus Carlsen
8:25
Epic Chess
Рет қаралды 50 М.
Chess Drama Continues Between Carlsen And Niemann
12:10
Epic Chess
Рет қаралды 24 М.