Replace all the secondary diagonal elements of the square array A with the number n
Example:
A = [1 2 3 4 5 6 7 8 9] n=0
Output = [1 2 0 4 0 6 0 8 9]
Example 2
A = 1; n = 10;
Output = 10
Additional test cases have been added.
Elegant! I made a trivial modification tha reduced the size by 4 (Soluion 796772)
749 Solvers
Who knows the last digit of pi?
488 Solvers
Calculate the area of a triangle between three points
280 Solvers
178 Solvers
Find out sum of all elements of given Matrix
272 Solvers