Newbie to Newbie part 2-Algorithmic design and data structure techniques
Algorithmic design and data structure techniques are used in developing structured programs to ensure that the program is efficient and effective. If you're new to learning algorithmic design, you may ask yourself, what is an Algorithm? And what are data structure techniques?
Algorithms are defined as programs or a sequence of steps to solve problems.
A Data structure is a type of storage mechanism for data. A few types are Linear and nonlinear data, Arrays, Strings, Stacks, Queues, graphs, and trees. Each of these types allows us to perform different operations efficiently.
According to Geeks for Geeks," There are several algorithm design techniques that can be used, such as brute-force or exhaustive search, divide and conquer, greedy algorithms, dynamic programming, branch and bound algorithm, and randomized algorithm."
The choice of algorithm design technique depends on the problem being solved and the problem's limitations. The algorithm choice is solely dependent on the problem being solved. The same can be said for data structure designs; both are chosen depending on the problem being solved.
One example would be arrays. Arrays are useful when the size of the data is known ahead of time and when random access is required. As we recently learned when creating a list of cars for an assignment in CPT 307, Trees are valuable when hierarchical relationships apply to the data.
Again, to apply algorithmic design and data structure techniques when developing structured programs, you must first identify the problem. After identifying the problem, choose an appropriate algorithm design technique and data structure design. Each algorithm design technique's time and space complexity should be considered when selecting a suitable method. An efficient data structure takes minimum memory space and requires minimum time to execute the data.
The time required for executing a code depends on the number of operations performed in the program, the speed of the device, and the speed of the data transfer.
A tool to help you decide which technique and structure to use is asymptotic notation. An asymptotic notion is a mathematical tool that calculates the required time by analyzing an algorithm's running time by identifying its behavior as its input size grows.
Geeks for Geeks states, "It neglects the system-dependent constants and is related to only the number of modular operations being performed in the whole program. The following 3 asymptotic notations are primarily used to represent the time complexity of algorithms:
Big-O Notation (Ο) – Big-O notation describes the worst-case scenario explicitly.
Omega Notation (Ω) – Omega(Ω) notation specifically describes the best-case scenario.
Theta Notation (θ) – This notation represents the average complexity of an algorithm."
No matter which programming language you use, learning algorithm design techniques in data structures is essential to create efficient programs. Selecting a proper design technique for algorithms is a complex task. The needs of the program and the developer's preference will determine which data structure will be utilized.
To learn more about the specifics of data structures and algorithms, I found the following page very insightful.
https://www.geeksforgeeks.org/types-of-asymptotic-notations-in-complexity-analysis-of-algorithms/
If you'd rather watch a video like me, here is another useful tool you can utilize.
https://youtu.be/BBpAmxU_NQo
https://youtu.be/BBpAmxU_NQo
Comments
Post a Comment