Send your feedback or ask for help here!
O(n^2) will timeout on validator 4. Single loop O(n) will pass validators. O(1) if u can work out the math. Thanks for the puzzle! No skill tags though?
No tag by intention, for not causing a prejudice in selection of an approach.
There are too many possibilities that can work, except by brute force O(n^2).
“Strive for simplicity” should be a good tag