The function _isInArray() plays a crucial role in the system, but its implementation takes too much gas when the array gets too long.
The function _isInArray() has O(n) complexity, which means the resources needed to finish the computation increases linearly with the array length. When the array has too many members, the function becomes too expensive to execute. When calling selectPresident(), it is highly likely that the function _isInArray() is called multiple times. If each call takes too much gas, the call will become too expensive to execute.
The operation becomes too expensive.
Manual review.
Consider using OpenZeppelin's EnumerableSet that has O(1) complexity which will reduce the gas consumption significantly.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.