Understanding algorithms — and how to make them work for you