The common factor must be an integer too, or else there is no way to find it without more parameters; defining the step and search interval for instance. Currently, any multiple of 5 would produce a valid "restored vector" for the only available test. The problem also needs a better test suite. It's a good problem.
10035 Solvers
268 Solvers
Number of 1s in a binary string
2992 Solvers
422 Solvers
554 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!