Algorithms and Data Structures Anyone?
Algorithms and Data Structures Anyone?
This all sounds very technical however, at their core, data structures and algorithms are necessary for every computer system and program to work properly in said system. These two principles work independently of one another while also maintaining the necessary relationship to build and execute the programs.
A program must have correct use of data structures for the algorithm design to allow the program itself to “work”. Algorithmic design refers to the mathematical process or method used when attempting to solve problems. There are a number of ways to design these algorithms, and each comes with its own complexities. The two main design approaches are Top-Down and Bottom-up. Top-Down focuses on taking a larger problem and dividing it up into smaller problems continuously until the complex problem is eventually solved. Bottom-up is the reverse of this where you take parts of complex programs and solve them, then put them together into the final solution.
The two main types of data structures are linked lists and arrays. Arrays are somewhat simple and most widely used data structure. All other data structures such as stacks, queues, lists, and trees can all be implemented by using linked lists or arrays.
While some would like us to believe that one algorithm or data structure is better than another, there is no possible way to “rank” them as it entirely depends on the problem you are facing and the resource constraints you are having to contend with. As a programmer, if you do not take both the problem at hand and the resources you are given work with into mind when choosing which data structure to use, it could spell disaster for your program. Picking the right data structure for a given task can literally determine if that task takes seconds or hours to “run”. As for algorithms, there are searching algorithms, sorting algorithms and others that can be used. The best algorithm at any given time is the one that can do the task you need within an acceptable period of time.
Relating to the application of algorithmic design and data structures, It is important to identify and assess the problem that needs solved and then determine which algorithm and data structure is needed. Again, efficiency within design parameters and resource constraints is key. Time complexity and space complexity also come into play and in many instances, one must be prioritized over the other to yield the right results for the task at hand.
Sources:
GeeksforGeeks. (2023d, February 6). Learn Data Structures and Algorithms DSA Tutorial. https://www.geeksforgeeks.org/learn-data-structures-and-algorithms-dsa-tutorial/
Complexity analysis Links to an external site.. (n.d.). Retrieved from http://www.cs.utexas.edu/users/djimenez/utsa/cs1723/lecture2.html
Comments
Post a Comment