The problem description says the output array elements can be in any order but the test cases seem to prefer some unknown order. Solution 682952 produces an array with same elements as the actual solution but the tests fail. Need a better description of the output desired or a more robust test suite.
Solution 682952 produces correct array, but doesn't pass it to the output.
Good Problem :)
This (and others, including Solution 1444556) only pass because of a mismatch between the Test Suite and the Problem Statement.
Sorry, I don't normally do this, but my curiosity about the whole regexp() thing finally got the better of me...
yes, but you are blocking others from learning the optimal solution. lame
Encode Roman Numerals
Solve the Sudoku Row
Number of Circles in a Number
Make a run-length companion vector
Breaking Bad Tiles (Spelling with Element Symbols)
Find an inscribed square on a closed curve
Give a matrix that matches itself when rotated
Convert hex color specification to MATLAB RGB
Put two time series onto the same time basis
Find the treasures in MATLAB Central and discover how the community can help you!
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