Matrix Quadrants
Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-ri...
約3年 前
解決済み
Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
"mirror" matrix
Create n x 2n "mirror" matrix of this type:
Examples
For n = 2
m = [ 1 2 2 1
1 2 2 1 ]
For n = 3
m = ...
約3年 前
解決済み
Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...
約3年 前
解決済み
Area of a Square
Inside a square is a circle with radius r.
What is the area of the square?
約3年 前
解決済み
Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise