4 ms·
Am I the only one that thinks the tutorials are a bit weird. For example: their QuickSort implementation looks pretty much "sub-optimal"". ( They allocate new
by je42 15y ago
Am I the only one that thinks the tutorials are a bit weird.
For example: their QuickSort implementation looks pretty much "sub-optimal"". ( They allocate new arrays in each recursive call )
Another example: Shortest-Path search. A-Star is not mentioned.
- Hitchhiker 15y agoI suffer at times from being too polite. Thanks for starting the drilling.
- ianbishop 15y agoAgreed but you have to keep in mind what the algorithms are being used for. You're going to have better luck implementing Dijkstra's quickly in a competition than you are A-Star. Not to mention A-Star is based mostly on heuristics and if you don't have time (or don't care) then bad heuristics makes it just as fast as Dikstra's.
- anonymoushn 15y agoRegarding A-star, it doesn't generally come up in this kind of contest. When you are doing a TopCoder/ICPC/Project Euler problem and you need to find shortest paths, you need exact solutions because you want your result to match the judges' result. In a programming contest in which the programs compete against each other, instead of passing or failing, A-star would be much more important.