4 ms·
Strictly speaking, that approach would help you find a heuristically good algorithm, but not necessarily the optimal one. Those are very different.
by onetoo 3y ago
Strictly speaking, that approach would help you find a heuristically good algorithm, but not necessarily the optimal one. Those are very different.
- jedberg 3y agoBut does it matter to anyone other than an academic? In practice the heuristically good == optimal.
- onetoo 3y agoWe should use the right words for things. Insertion sort is heuristically good in many practical circumstances. You wouldn't call it optimal, nor choose to use it as your general-purpose sorting algorithm.