Avatar

Organizations

4 results for 矩阵
  • 给定一个  m x n 二维字符网格  board 和一个单词(字符串)列表words返回所有二维网格上的单词 。

    单词必须按照字母顺序,通过 相邻的单元格内的字母构成,其中“相邻”单元格是那些水平相邻或垂直相邻的单元格。同一个单元格内的字母在一个单词中不允许被重复使用。

    leetcode 困难 字典树 数组 字符串 Created Tue, 27 Dec 2022 15:20:42 +0800
  • 给定一个  m x n 整数矩阵  matrix ,找出其中 最长递增路径 的长度。

    对于每个单元格,你可以往上,下,左,右四个方向移动。 你 不能对角线 方向上移动或移动到 边界外(即不允许环绕)。

  • The demons had captured the princess and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of m x n rooms laid out in a 2D grid. Our valiant knight was initially positioned in the top-left room and must fight his way through dungeon to rescue the princess.

    The knight has an initial health point represented by a positive integer. If at any point his health point drops to 0 or below, he dies immediately.

    Some of the rooms are guarded by demons (represented by negative integers), so the knight loses health upon entering these rooms; other rooms are either empty (represented as 0) or contain magic orbs that increase the knight’s health (represented by positive integers).

    To reach the princess as quickly as possible, the knight decides to move only rightward or downward in each step.

    Return the knight’s minimum initial health so that he can rescue the princess.

    leetcode 困难 数组 动态规划 矩阵 Created Tue, 13 Sep 2022 17:00:13 +0800
  • 给定一个仅包含  01 、大小为 rows x cols 的二维二进制矩阵,找出只包含 1 的最大矩形,并返回其面积。

    leetcode 困难 数组 动态规划 Created Tue, 13 Sep 2022 12:53:39 +0800