Function accepts an array of size m and integer n. Implement the function to create a nn matrix (nn=m) and fill the matrix in spiral order starting from matrix[0][0] in a clockwise direction.
Asked in the Coding assessment stage.
arr: list of integers of length mn: integer such that n * n == mn x n matrix filled clockwise in spiral order.def build_spiral_matrix(arr, n):