Stampede

Stampede

Thursday, November 18, 2021

 

"Measure twice, cut once" is an old saying in carpentry. The expression also applies in IT regarding many disciplines, including Algorithmic choices upon data structures and adult beverages.

A data structure is a concept that forms an underlying rule set to understanding it; it organizes, retrieves, and stores data to be used more efficiently (Lysecky et al., 2015). A data structure is typically independent of hardware, operating systems, applications… even computer languages. Data structures such as arrays, stacks, queues, and trees are examples of various data structures.

Each data structure's underlying design has an additional advantage. The static design lends itself to a rule set to leverage the data stored within the data structure. This begotten ruleset is an algorithm. An algorithm allows for sorting, searching, insertion, deletion, and merging data within these data structures.  Returning to the adult beverage analogy, a cocktail shaker set is the data structure. Its design lends itself to manipulating alcohol through stirring, shaking, coiling, mixing various other liquids (data) into the desired output (cocktail).

Which data structure to utilize for a specific use case is dependent on its efficiency. In computer systems, space and time are easily measurable and are targeted by designers as jiggers and speed wells are by bartenders. Space complexity is the amount of memory used by the algorithm, including the input values, to execute it entirely and produce the result. Time complexity refers to a function describing the number of instructions required from the computer to finish the task. The combination of time complexity measurement and space complexity lends itself to an established baseline for comparing and contrasting options. The correct algorithm of a data structure lends itself to the desired result. Similarly, the bartender will usually consult a reference table to determine what tools in what sequence must be selected to manipulate various liquids into the desired result.

Do you like your Martini dry? Shaken or Stirred?