Data structures and Algorithms

Akol Sharon Norah
3 min readSep 7, 2019

Application of data structures and algorithms

When it comes to programming, the most important and primary thing taught in most training institutions and tech sites is data structures and algorithms. Programming is quite hectic without the knowledge of data structures and algorithms. Programmers perform all their tasks in three basic steps i.e. input data, process data and output data. Algorithms perform operations on the data effectively, therefore, it’s important for developers to know how to structure their data so that algorithms can utilize, iterate through the data quickly. In this blog post, I will give you a great understanding of data structures and the need for algorithms, and data structures.

What are Datastructures and Algorithms

In computing, a data structure is a data organization, management, and storage format that enables efficient access and modification of data. Anything that can store data is referred to as a data structure. The basic types of data structures include stacks, queues, linked lists, arrays, graphs, trees. All these data structures allow us to perform different operations on data. We select these data structures based on which type of operation is required

An Algorithm, on the other hand, is a set of instructions designed to perform a specific task, for example, a calculation, data processing. An algorithm is said to be efficient and fast if it takes less time to execute and consumes less memory space. In computing, we have different sorting algorithms like the bubble sort, merge sort, quick sort, insertion sort, selection sort and searching algorithms like binary search, depth-first search, breadth-first search and so on.

Application of data structures and algorithms in programming

Now you must be thinking that in the entire computer education where do these data structures apply. Remember, data structures basics simply guide us on how to organise information in a system. A slight change of information can cause a huge change in the performance of your system. Let’s imagine you at a supermarket. At this particular supermarket, the bread is stored next to the fruits and the toothbrushes are next to the milk. The supermarket does not have signs that indicate where different items are located. In this disorganized supermarket, you would have a pretty difficult time trying to find what you were looking for! Fortunately, most supermarkets have a clear order to the way they are stocked and laid out. Similarly, data structures provide us with a way to organize information.

What about algorithms? you probably wish you could see an example, right? So, what exactly does an algorithm in programming look like? Well, asking a user for an email address is probably one of the most common tasks a web-based program might need to do, so that is what I will use here for an example. An algorithm can be written as a list of steps using text.

Step1: Start

Step2: Create a variable to receive the user’s email address.

Step3: Clear the variable in case it’s not empty.

Step4: Ask the user for the email address.

Step5: Store the response in the variable.

Step6: Check the stored response if it is a valid email address.

Step7: If it’s not valid, go back to step3.

Step8: If it’s valid, End.

As you’ve seen, data structures are the essential building blocks that we use to organize all of our digital information. Choosing the right data structure allows us to use the algorithms we want and keeps our code running smoothly. Understanding data structures and how to use them well can play a very important role in a programmer’s life. As long as you haven’t mastered this concept, data structures and algorithms will forever be vital in computing, you can wholeheartedly spare time on gaining a deep and thorough knowledge of them and know that they will pay dividends for your entire career as a programmer.

--

--