LONGEST LINE OF CONSECUTIVE ONES | LEETCODE 562 | PYTHON DFS SOLUTION

Описание к видео LONGEST LINE OF CONSECUTIVE ONES | LEETCODE 562 | PYTHON DFS SOLUTION

Discord Link:   / discord  

Problem Link: https://leetcode.com/problems/longest...

In this video we are solving yet again another Google interview question: Longest Line of Consecutive Ones in Matrix (Leetcode 562).

Yet again we see the familiar pattern of DFS through a matrix to get a solution and the solution is very similar to what we've done before. The only major change is that we need to check in 8 directions for every tile that is a 1. Luckily we can use memoization here to simply the computation.

TIMESTAMPS
00:00 Intro
00:17 Question Prompt
00:32 Basic Example
01:00 Solution Intuition
03:07 Coding
10:35 Time/Space Complexity
12:15 Outro

Комментарии

Информация по комментариям в разработке