Wednesday, January 6, 2021

Algorithm Design and Data Structures

 

To understand how to apply algorithm and data structure techniques, we need to define these elements. An algorithm is a set of well-defined instructions in sequence to help solve a problem. In contrast, data structures are named locations that can be used to store and organize data (Programiz. n.d.). There are several different types of algorithm data structures that can be used when implementing a program. Some of these examples include lists, stacks, trees, and sorts. Which data structure to utilize will depend on the problems that need to be solved. According to the article quoted above, some of the qualities of a good algorithm include precisely defined inputs and outputs, each step should be clear, algorithms should be most effective among many ways to solve a problem, and algorithms should be written in a way that can be used in many programming languages (Programiz. n.d.).

Another critical aspect to consider is space and time complexity when utilizing algorithms. Space complexity is the amount of space or memory needed to solve a problem, whereas time complexity is how long it takes to solve a problem. The goal is to solve problems using the least amount of memory and the least amount of time to solve problems. With that being said, each algorithm has a different purpose, and the problem being solved will determine which algorithm may be best. For example, if a user needs to organize values such as employees pay structures, a sorting algorithm may be best. Another example may be a company that needs to provide a list of products. In this case, a list algorithm may be best.

References:

Programiz (n.d.). Learn DS and Algorithms. Programiz. Retrieved from https://www.programiz.com/dsa#:~:text=A%20data%20structure%20is%20a,efficient%20and%20optimized%20computer%20programs.

No comments:

Post a Comment