Newbie to Newbie - Data Structures and Algorithmic Design

 


This week's topic for discussion is data structures and algorithmic design.  Whether you are new to programming or have been at it for many years, one thing is certain: not all algorithms and data structures are equal.  

Creating programs involves following a blueprint that efficiently organizes and manipulates data to solve a problem.  This also involves selecting the right tools for the job based on the characteristics of the problem that is trying to be solved.  Designing each program consists of knowing the operations that will be required, how much data will be involved, and the patterns of access that will be needed to get the best performance.

Before we begin, a few fundamental definitions should be known.

Algorithm:
     A set of defined instructions to solve a problem.

Data Structure:
     Organizing and storing data in specific ways, such as lists, trees, or tables, allows for specific operations like searching, adding, and deleting.

We must do a few things to apply algorithmic design and data structure techniques when developing structured programs.

First, we must identify the problem that needs to be solved with the data we have and the output we need.

Secondly, the problem must be analyzed to determine Data Access Patterns and how the data needs to be accessed, such as sequential or random.  Evaluate the Data Size to know if it's large, small, or dynamic because that will impact how much it will be involved.  Determine the Required Operations such as sorting, searching, deletions, or insertions so that you know what actions need to be performed.

Thirdly, the proper data structure, like Arrays, Linked Lists, Stacks, Queues, Trees, and Hash Tables, will need to be selected.

Lastly, the algorithm needs to be designed by looking at the problem and separating it into smaller manageable parts, selecting the best algorithm design technique, and then analyzing its performance to see how it scales with input size.

While designing the algorithms, there are a few techniques that need to be considered:
  • Divide and Conquer - breaking the problem apart, solving them, and then combining the results.
  • Greedy Algorithm - Best optimized solutions by making choices at each step.
  • Dynamic Programming - Avoiding redundant computations by storing previously calculated results.
  • Backtracking - Go to previous computations after looking at all possible solutions but not finding any.
Remember, when constructing algorithms to solve problems, the designer should always focus on the programs' construction and efficiency, ensuring the specific requirements are met for the data structures being used and concentrating on the best performance that can be achieved.

For further information, here are a few links that might help:


References:

UniUniversity of Miami. (2024). Computer Programming, Data Structures, Algorithms and Techniques. In University of Miami Cognate Search Engine. https://cognates.miami.edu/ST_0006


Comments