Community Profile

photo

shang jiang


Last seen: 1 year ago Active since 2021

Statistics

  • Promoter
  • Solver

View badges

Content Feed

View by

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

2 years ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

2 years ago

Solved


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

2 years ago

Solved


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

2 years ago

Solved


Factorize uniquely! (★★)

2 years ago

Solved


Draw a '0' in a one matrix!

2 years ago

Solved


calculate the length of matrix
input 1 array, calculate the length

2 years ago

Solved


the average value of the elements
Calculate the average value of the elements in the array

2 years ago

Solved


Find the max element of the array
Find the max element of the array

2 years ago

Solved


Draw matrix 'Swiss flag'( Euro 2020)
Draw a x-by-x matrix 'Swiss flag' using '0' and '1'.(x is odd and bigger than 4) Example x=5 ...

2 years ago

Solved


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

2 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

2 years ago