**Problem link:** https://leetcode.com/problems/rotate-image/

The purpose of this problem is to rotate a matrix 90 degrees to the right.

Here are a couple example inputs and outputs:

Note that the matrix must have the same number of rows and columns. Above there are examples of 4x4, 3x3, and 2x2 inputs.

The definition of transpose from lexico.com is the following:

*“Cause (two or more things) to change places with each other”*

Imagine that the matix is a sqaure piece of paper. We fold the square diagonally so that the crease line will go from the top left corner to the bottom right corner. Then we flip the paper on the axis of our crease. Even though we flipped the paper over, the numbers on the other side of the paper show through. …

Problem link: https://leetcode.com/problems/maximum-subarray/

The purpose of the problem is find the max sum of contiguous values in an array.

Here are a couple example inputs and outputs:

Input:[-2,1,-3,4,-1,2,1,-5,4],Output:6Explanation:[4,-1,2,1] has the largest sum = 6.Input:[-2,-11,-13,-2,-14,-9,-5,-15,-3],Output:-2Explanation:[-2] has the largest sum = -2.Input:[-2,0,-1]Output:0Explanation:[0] has the largest sum = 0.

This is that most obvious solution, but unfortunately isn’t very efficient. …

Problem link: https://leetcode.com/problems/01-matrix/

The purpose of the problem is to update a matrix of 0s and 1s by determining the distance from the nearest 0 in each cell. There will always be at least one 0 in the matrix. The distance is calculated using adjacent cells, and adjacent cells are directly above, below, left, or right each other. This means you don’t need to worry about diagonals.

Here are a couple example inputs and outputs:

This was the first way that I thought of solving the problem. …

About