© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
T. MailundIntroduction to Computational Thinkinghttps://doi.org/10.1007/978-1-4842-7077-6_4

4. Algorithmic Efficiency

Thomas Mailund1  
(1)
Aarhus N, Denmark
 

As a general rule, we want our algorithms to work as efficiently as possible, which usually means that we want them to quickly solve the problem they are designed for using as few resources, such as memory or disk space, as possible. This is just a rule of thumb, of course, since we also need to factor in programmer time. If you need a problem solved a month from now and you have an algorithm that can solve the problem in two weeks and takes one week to implement, that is preferable over an algorithm that ...

Get Introduction to Computational Thinking: Problem Solving, Algorithms, Data Structures, and More now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.