Time complexity should be O(m*n), m being the rows of matrix and n being the columns of matrix. Space complexity should be O(1), excluding the recursive stack. HAPPY CASE Input: grid = [[0,1,0,0],[1,1,1,0],[0,1,0,0],[1,1,0,0]] Output: 16 Explanation: The perimeter...
0463-island-perimeter 0463-island-perimeter.java NOTES.md README.md 0485-max-consecutive-ones 0496-next-greater-element-i 0543-diameter-of-binary-tree 0550-game-play-analysis-iv 0566-reshape-the-matrix 0567-permutation-in-string 0570-managers-with-at-least-5-direct-reports 0572-subtree-of-anothe...