Algorithms & Data Structures
There are several steps to choosing an algorithm
- First, assess potential algorithms and data structures.
Consider how much data the program is likely to process.
If the problem involves modest amounts of data, choose simple techniques.
If the data could grow, eliminate designs that will not scale up to large inputs.
Then, use a library or language feature if you can.
Failing that, write or borrow a short, simple, easy to understand implementation.
Try it.
If measurements prove it to be too slow, only then should you upgrade to a more advanced technique.