2 ms·
I'm not convinced that brute force is such a bad approach, as long as a) you start with the greedy approximation, and b) stop once you know you're doing worse t
by rflrob 16y ago
I'm not convinced that brute force is such a bad approach, as long as a) you start with the greedy approximation, and b) stop once you know you're doing worse than the greedy approximation. My python brute-force solution runs in .035 s.
- georgieporgie 16y agoMy brute force algorithm runs in about two minutes... It's C++. I'm sure you can see why I'm so interested in better solutions. :-)