Algorithmic and Data Structure Design

 Algorithm Design


When building an application there are several variables to consider in the creation of your algorithms.

The first of which is time complexity. This can be anything from the amount of memory accesses, cpu cycles, or even amount of times a function or loop is called within an algorithm in order to reach the desired outcome. Less time is generally better so efficiency should be prioritized if the algorithm is to be ran frequently and especially on large data sets.

The second is space complexity. This can be broken down largely into the amount of memory required to run the algorithm.


In the case of larger or more complex data sets we will want to ensure the algorithm is more highly optimized to prevent waste as it will grow exponentially based on the inputs and amount of times the algorithm will need to be ran. For example, a 12GB input that will be ran daily will be negatively impacted by inefficient design far worse than a 1KB input for an algorithm that will only be ran once.


Following these considerations, you will want to ensure that the design is easy to code, debug, and understand for the inevitability that someone else will later need to work on or with it as well.


Data Structure Decisions



When it comes to data structures, you will need to consider some variables as well to decide the ideal solution. First, you will need to see what types of operations will be ran as well as resource limitations on the system or systems to be used. Following that you should have narrowed down your options to a select few. From there you can decide what you think will be the best fit depending on your specific use case scenario.

Comments

Popular Posts