4 ms·
Yes, but more slowly. According to the GP, with the knowledge provided, it can be brute-forced in O(log n) time instead of O(n^2).
by Crestwave 2y ago
Yes, but more slowly. According to the GP, with the knowledge provided, it can be brute-forced in O(log n) time instead of O(n^2).