Solution Stats

Last 200 Solutions

Problem Comments

Please add more than one test case. Otherwise, the problem can be obviated by simply hard-coding solutions. You mention that with some data sets there could be more than one solution. Well, please put in the time and effort to develop a suitable test suite with such test cases included. Three or four test cases should be a minimum.

This is a nice problem, I encourage you to extend it with additional test cases. Also it is unclear what format you would expect the output to be when there are multiple solutions: multiple outputs? a cell array?