Problem 61006. Shapiro Polynomials
%Example
P1(x) = x + 1 => Output = [1 1];
P3(x) = x^7 - x^6 + x^5 + x^4 - x^3 + x^2 + x + 1 => Output = [1 -1 1 1 -1 1 1 1];
Solution Stats
Problem Comments
-
3 Comments
Christian Schröder
10 hours and 30 minutes ago
Are you sure the test suite's expected results for for n=4 and n=5 are correct? I'm getting different values. Furthermore, the test suite's expected result for n=3 (correct) appears to contradict the problem description (incorrect).
Matthew
9 hours and 8 minutes ago
I agree with Christian, test cases 4 and 5 seem to be incorrect.
Dyuman Joshi
1 hour and 52 minutes ago
Yes, the test suite was incorrect - I seem to have used the coefficients starting from the (2^n)th power.
The error has been rectified (including the typo in description) and both of your solutions have been rescored and accepted. Do rate the problem!
Solution Comments
Show commentsProblem Recent Solvers2
Suggested Problems
-
2 Solvers
More from this Author39
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!