Programming experience with data structures and algorithms.

Samantha Namugema
Sep 6, 2018 · 2 min read

A data structure in any programming environment is a specialized format for organizing and storing data so that it can be used efficiently. These include; Arrays, Linked Lists, Stack, Queues, Trees, Graphs, Sets, Hash Tables and so forth.

As an individual, I have learnt how important it is for a developer to be aware of and utilize these data structures to make their programs efficient. Efficiency can be defined in terms of processing time and memory. These structures dictate how data is stored in memory and what sort of operations can be performed on that data. Such operations would include Searching, Insertion, Deletion, Sorting, Merging etc. There are so many ways a programmer can search, insert, sort and delete records in a database however it is important to choose a method of execution that is simple and saves time. These methods are called Algorithms.

In the case of an online shopping application like Kikuu. A customer can use the search button to look for his/her desired item. A programmer implementing such an operation has to take into consideration that data in a database grows over time. This means a user will take longer to receive results from a search.

This programmer will decide to employ one of the following algorithms to implement the search;

  1. Linear Search

This method of search compares the user input from the application with each entry of items in the Kikuu database, from the first to the last. Best case scenario, the item is found immediately before going through all items available. Worst case scenario all items are checked and no results found.

This method is slow in large applications but it is simple to implement.

  1. Binary Search

This method of search works if the data set is arranged in an organized manner (ascending order). It splits the data set into two parts. So when a customer looks for an item like “Mat”, the application would check the middle item to see what letter it starts with. If it finds Jacket, that starts with the letter “J”, it will know that since “M” comes before “J” the item must be in the second half of the data set. This approach has cut searching time by half.

Although this method provides output faster, it is also harder to implement.

One of the key skills of a software engineer is choosing data structures and algorithms that “scale up” well when the amount of data and/or frequency of access increases. If a programmer is aspiring to work on large scale projects from websites to desktop applications and mobile systems, he/she is expected to go in knowing the strengths and weaknesses of various data structures and algorithms.

Samantha Namugema

Written by

... there is nothing new under the sun. Ecclesiastes 1:9 ESV