Problem 54780. Trap a knight
Solution Stats
Problem Comments
-
1 Comment
my solution (using brute force) is giving the right answer (on the test cases I checked) but it's failing in Cody due to time constraints. I hate it when it does that.
in test case - 5, tic-toc is giving me 5s. I might be able to optimize the code a little more but I am not sure that would be enough. I think it's failing on the loop test cases due to runtime.
is it necessary to use loop cases as they tend to take a long time? why not just random settings?
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
How to find the position of an element in a vector without using the find function
2694 Solvers
-
Recurring Cycle Length (Inspired by Project Euler Problem 26)
115 Solvers
-
Back to basics 9 - Indexed References
435 Solvers
-
Find best placement for ordered dominoes (harder)
309 Solvers
-
Chebyshev polynomials of the 1st Kind
70 Solvers
More from this Author250
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!