Skip to main content

Algorithmic Design and Data Structure Techniques for Beginners





When trying to understand data structures and algorithms it can seem like it can be a little overwhelming. Breaking it down to the lowest level will help in understanding these topics. As stated by Vahid, Lysecky, Vahid and Givargis (2015) an algorithm “is a sequence of steps for accomplishing a task”. Searching for a given value is a good example where a good algorithm would come in handy.  

A linear search will iterate through different values that will stop when it has either found the value of a value or when there is no more value to check. A better choice would be a binary search algorithm. Instead of iterating through each value in a list, it cuts the list in half and searches on either side and continues the process until the value is found. You must ensure that the values are sorted before applying a binary search algorithm. This type of algorithm can find values a lot more efficiently than a linear search algorithm. There are many search algorithms, but I prefer the binary search because I think it more efficient.

 

Data structure can be explained as “any data representation and its associated operations” or “to mean an organization or structuring for a collection of data items” (Shaffer, 2013). A few data structures Java uses are lists, tree and queue. Lists pretty much gives itself away in its name. A list is a data structure you can append, remove, or search through. It is simple enough to use. A tree in my opinion is a much more of a complex data structure in my opinion. I do not have much experience learning to use a tree, it might be a little difficult to understand at first. A tree starts out with a root node and branches off from there. A queue is a data structure where values are inserted at the end and take from the top. This may make it difficult to remove items from the list if it is not at the top. I think an efficient data structure is a linked list. I also think that when learning a new programming language simplicity is important.

Comments