subject

##PYTHON##spiral_matrix(rows: int, cols: int, start: int) -> StaticArray: NO Python built-in functions. Only use the pre-defined StaticArray class and Methods.
Write a function that receives three integers (rows, cols, and start), then creates and returns a 2D matrix (represented as a StaticArray of StaticArrays). The dimensions of the matrix should be rows x cols. The matrix should be filled with the integers that start from the provided start value and sequentially increase by 1 (if the start value is >= 0) or decrease by 1 (if the start value is < 0).
When the start value is non-negative, it should be placed in the upper right corner of the matrix, and all subsequent integers should be put into the matrix in a clockwise spiral order. See figure 1 below for more details. When the start value is negative, it should be placed in the lower left corner of the matrix, and all subsequent integers should be put into the matrix in a counterclockwise spiral order. See figure 2 below for more details.
Please review the code examples below, (especially example #2) for clarification. You may assume that rows and cols will be positive integers. You do not need to write checks for these conditions.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:10
Chiko bought 75 shares of stock at $19.58 per share. he received dividends of $73.42 during the year. at the end of the year, his stock was valued at $22.14. what was his purchase price?
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
Worth 50 points answer them bc i am not sure if i am wrong
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
In excel, what happens to the cell contents when you click and drag a cell into multiple cells?
Answers: 1
You know the right answer?
##PYTHON##spiral_matrix(rows: int, cols: int, start: int) -> StaticArray: NO Python built-in fun...
Questions
question
Mathematics, 24.01.2020 09:31
question
Mathematics, 24.01.2020 09:31
Questions on the website: 13722367