Test suite case 3 seems to be incorrect.
yeah, test case 3 should be [1 1 2 3 1 1 1 5 2 2] by my calculation
Sorry about that. Cut and paste fail.
Test case 3 is still incorrect.
I tried solving this in MATLAB & it gave correct answer for the 3rd test suite also
Sum all integers from 1 to 2^n
Add more zeros
MATCH THE STRINGS (2 CHAR) very easy
Create an index-powered vector
Write c^3 as sum of two squares a^2+b^2
Create a recurrence matrix for a vector of data
Construct a string from letters and counts
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