I n the problem Loan Repayment, I have found potentially a faster way to check if an integer x is viable (in theoretical O(1) time) thus speeding up the entire solution from O(sqrt(n) * log n) to O(log n).
However, I couldn’t quite get my solution to work and was wondering if someone on here would be willing to help out or let me know if this is a dead end.
Although this seems promising, in my eyes it probably is a dead end- if there was an O(1) method to check, the official solution probably would have mentioned it.