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, 22.06.2019 21:00
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
question
Computers and Technology, 23.06.2019 22:00
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
You know the right answer?
##PYTHON##spiral_matrix(rows: int, cols: int, start: int) -> StaticArray: NO Python built-in fun...
Questions
question
Social Studies, 28.10.2020 17:50
question
Social Studies, 28.10.2020 17:50
question
Mathematics, 28.10.2020 17:50
question
Mathematics, 28.10.2020 17:50