Google / Amazon Interview Question — LeetCode 1292 — Y Tech

Y Tech
2 min readFeb 2, 2022

In this post, we are going to discuss leetcode 1292 — Maximum Side Length of a Square with Sum Less than or Equal to Threshold, which is asked in Google, and Amazon interviews.

Problem Analysis

Given a m x n matrix mat and an integer threshold, return the maximum side-length of a square with a sum less than or equal to threshold or return 0 if there is no such square.

Example 1:

Input: mat = [[1,1,3,2,4,3,2],[1,1,3,2,4,3,2],[1,1,3,2,4,3,2]]

--

--