Given a matrix, print all its elements in the spiral form (clockwise direction).
a=[16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1]
output = [16 2 3 13 8 12 1 15 14 4 9 5 11 10 6 7]
I think some of the solution vectors in this problem are incorrect. In problem 2, for example, all the numbers after 120 are duplicates.
sorry about that..there was a bug in my code
It's been fixed now
Back and Forth Rows
Given two strings, find the maximum overlap
Find the sum of the elements in the "second" diagonal
Divisors of an integer
Take a binary number as input,rearrange it in any manner such that its value is greater than the original one.output should be all the possible values in decimal.
How many ways?
Coin Distribution - 02
Connect Four - 02
ZigZag - 01
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office