Problem 46565. Find an inscribed square on a closed curve
Solution Stats
Problem Comments
-
5 Comments
Where is the square in the last test? The test passes with [1 3 5 7], but that's a rhombus. The angle test works because the dot products are 3, 3, -3, -3, and their sum is still zero. Perhaps checking that all dot products are zero (or less than a tolerance) would work.
Hello Chris, there is actually a typo from my side in the last test case.
Point #6 is supposed to be (1,-1) instead of (-1, 1) (which occurs twice).
I am unable to correct the test suite at this moment, I will update it inline with your feedback, as soon as I can.
Hello Chris, I have corrected the test case #7 and modified the test suite as per your suggestion.
Also, I have rescored the solutions.
It was interesting to see that quite a many solutions failed the last test case, incorrectly giving the rhombus as the solution
(i.e [1 3 5 7]).
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
Maximum running product for a string of numbers
2198 Solvers
-
Nonuniform quantizer as a piecewise constant function
55 Solvers
-
88 Solvers
-
308 Solvers
-
Calculate Amount of Cake Frosting
26129 Solvers
More from this Author50
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!