CPT 307 Week 5 IA Post Algorithmic Design and Data structure
How to apply algorithmic design & data structure techniques in developing structure programs?
An algorithm is a step-by-step process that defines instructions to be executed in a specific order to get the desired output. Algorithms are generally created independent of underlying languages; an algorithm can be implemented in more than one programming language or general program.
From the data structure point of view, the following are some important categories of algorithms;
- Search − Used to search an item in a data structure.
- Sort − Used to sort items in a particular order.
- Insert − Used to insert an item in a data structure.
- Update − Used to update an existing item in a data structure.
- Delete − Used to delete an existing item from a data structure.
Data structures are generally based on the ability of a computer to fetch and store data at any place in its memory, specified by a bit string representing a memory address that can be in itself stored in memory and manipulated by the program.
Implementing a data structure usually requires writing a set of processes that create and manipulate instances of that structure. The efficiency of a data structure cannot be analyzed separately from those operations. This observation motivates the theoretical concept of an abstract data type, a data structure defined indirectly by its procedures and the mathematical properties of those operations, including their space and time cost. In conclusion there are some data structures that are better than others depending on what the user needs.
Explain why one design would be used before another method would be used.
A data structure requires a certain amount of space for each data item it stores, a certain amount of time to perform for example a search through the data scripts, and a certain amount of programming effort. Each problem has constraints on the available space and time. Each solution to a problem uses the vital functions in some relative proportion, and the data structure selection process must account for this. Only after a careful analysis of the problem’s characteristics can the user determine the best data structure for the task. Each data structure and algorithm has associated costs and benefits. In practice, it is hardly ever true that one type is better than another for use in all situations. If one data structure or algorithm is superior to another in all respects, the inferior one will usually have long been forgotten.
How would you apply algorithmic design and data structure techniques in developing structure programs?
The process of selecting a proper design technique for algorithms is a complex but essential task. Following are some of the main algorithm design techniques:
- Brute-force or exhaustive search
- Divide and Conquer
- Greedy Algorithms
- Dynamic Programming
- Randomized Algorithm
- Backtracking
References:
1.1. Data structures and algorithms — CS2 software design & data structures. (n.d.). OpenDSA. https://opendsa-server.cs.vt.edu/ODSA/Books/CS2/html/IntroDSA.html
Algorithm design techniques | How is algorithm design applied? | WLU. (2019, February 12). Laurier Online | 100% Online. Flexible, career-ready degrees. https://online.wlu.ca/news/2019/02/12/how-algorithm-design-applied
Data structure. (2001, October 27). Wikipedia, the free encyclopedia. Retrieved November 21, 2021, from https://en.wikipedia.org/wiki/Data_structure
Comments
Post a Comment