Code Challenges

Get better at coding with practice problems.

Coding Challenges

Select a problem, write code, run test cases, and submit your solution.

Showing 19 of 21 problems

Implement the longestIncreasingPathMatrix method that returns the longest strictly increasing path length in a matrix. Solved

Implement the surroundedRegionsSafeCount method that counts cells not captured in a surrounded-regions board. Solved

Implement the nearestZeroDistanceSum method that returns the sum of distances from every cell to its nearest zero. Solved

Implement the matrixBlockSumCenter method that returns the block sum around the center using distance k. Solved

Implement the countSquareSubmatricesOnes method that counts square submatrices that contain only 1 values. Solved

Implement the wordSearchMatrixExists method that checks whether the word exists in the matrix path. Solved

Implement the maximalSquareMatrixArea method that returns the area of the largest square containing only 1 values. Solved

Implement the rotateImageClockwise method that returns the matrix after rotating it 90 degrees clockwise. Solved

Implement the spiralOrderTraversalLength method that returns the number of elements visited in spiral order. Solved

Implement the setMatrixZeroesCount method that counts cells affected after applying matrix zeroing rules. Solved