Algorithms & Data Structure Designs
An algorithm is a set of instructions used to solve a specific problem. In the case of let's say a tree map, the purpose of this type of algorithm is to organized data in a hierarchical structure while also showing relationships between categories and subcategories visually. Another good example is the search algorithm which helps find information inside a script, while the sorting algorithm helps organize arrays or lists.
Data structures are equally as important when it comes to developing code because it determines how data is organized and accessed within an application. Choosing the correct data structure is paramount to the success of the code. For example arrays are useful when data needs to be accessed quickly through indexes because they allow direct access to elements. In my own experience, I work with data structures regularly when automating accounting and reporting processes. For example, ERP data extracted into Excel or Power BI often behaves similarly to arrays or tables where information is stored in rows and columns. I also use lookup structures similar to dictionaries(in VBA) to quickly match company codes, payees, recipients, and budget information. Using the correct structure allows the automation to process large amounts of financial data efficiently while reducing manual work and human error.
Although there are some algorithms and data structure designs that are definitively better than others depending of the situation at hand. For example, if a programmer needs speed, they may opt out for a binary search algorithm which is much faster than a linear search because binary search splits the data instead of checking every part of the array. Although binary search is much faster, it only works properly when the data is already sorted. In my case, I mainly use linear search because I want my code to be flexible and applicable to a variety of situations. In many real world scenarios, especially when working with ERP data and automated reporting, sorting the data beforehand may not always be practical or possible. Because of this, I usually resort to linear searching since it allows the program to scan through the data as it exists and still retrieve the information needed without requiring additional preprocessing steps.
Comments
Post a Comment