19 ms·
The real issue is that binary search doesn't work if you can only break two bulbs. I believe yours is the common optimal solution.
by jemfinch 16y ago
The real issue is that binary search doesn't work if you can only break two bulbs.
I believe yours is the common optimal solution.