Problem 2597. Alternative Scoring. Create an incremental spiral.
This problem is created to test an alternative Cody scoring system. It is based on the current one, but few changes are introduced. The main difference is that strings generate nearly same size as other arrays so '12345'-'0' won't be smaller than [1 2 3 4 5]. There is also improvement of scoring when ans is used.
Your goal is to write a function that for given n creates spiral matrix like in problem 944. You can choose one or more ways to do this:
- Clean Code - without any kind of cheating,
- Small Size - using cheats based on scoring system like regexp or 'chars'-'0',
- Hack+100 - if you really want, I can't stop you from hacking this problem, set size to 100 in this case, please.
Enjoy!
Solution Stats
Problem Comments
-
2 Comments
Nikolaos Nikolaou
on 16 Nov 2020
Test suite still doesnt work plz either fix or remove
goc3
on 18 Nov 2020
The test suite has had the alternate scoring method commented out.
Solution Comments
Show commentsProblem Recent Solvers18
Suggested Problems
-
Remove any row in which a NaN appears
8589 Solvers
-
Make an awesome ramp for a tiny motorcycle stuntman
653 Solvers
-
Split a string into chunks of specified length
1714 Solvers
-
173 Solvers
-
Write a function man that takes a row vector v and returns a matrix H as follows..
615 Solvers
More from this Author40
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!