Skip to main content

Posts

Showing posts from November, 2018

CPT 307: Starting to understand algorithm selection

As it turns out, there is a specific science to selecting the best algorithm to apply to data within a program.  When I first started my Data Structures & Algorithms class, I was excited to learn about different algorithms, and how to efficiently store and sort data using advanced data structures.  What I learned was that there are a great many different algorithms to both search and sort information stored in arrays.  Some websites, such as geeksforgeeks.org, have entire lists of different algorithms each with differing complexities, and each tailored for a specific use.  The computer science community describes algorithm efficiency using two different measures of complexity.  Time complexity is a function relating the number of actions (n) that will be performed on an array (a[]).  There are many different kinds of actions that an algorithm can perform on an array of data.  Time can mean the number of memory accesses performed, the number of comparisons between integers, the nu