Data Structures and Algorithms — Part 1

Inyangpsalms
2 min readJul 22, 2022

--

… the blood vein of every effective program

The programmer’s primary weapon in the never-ending battle against slow system is to change the intramodular structure. Our first response should be to reorganize the modules’ data structures.Fred Brooks

What Are Data Structures?

Data structures as complex as we often make of it, are simply ways used to store data on order to enhance effective manipulation, organization and retrieval of the stored data. Depending on the data to be captured or based on the approach of the project you can use a different data structure to increase your efficiency. Popular data structures are, but not limited to arrays, Linked List, Stacks, Queues, Graphs, Maps etc.

Types of Data Structures

With the wide range of data structures within our reach, all of such data structures can be divided into 2 (two) main categories:

  1. Linear Data Structures: Here elements are arranged in a sequential order, and are easy to implement; but where there is complexity it increases the operational complexity of linear data structures. Examples are Arrays, Stacks, Queues, Linked List.
  2. Non- Linear Data Structures: Elements here are arranged in hierarchical order, which increases the connection between elements; non-linear data structures are further divided into tree-based and graph-based structures

in subsequent articles we will discuss in depth these data structures and also implement them with a high level language of choice.

An algorithm must be seen to be believed. — Donald Knuth

WHAT IS AN ALGORITHM?

An algorithm is a set of well-defined instructions to solve a particular problem. It takes a set of input(s) and produces the desired output within a finite period of time.

Qualities of A Good Algorithm

  • Input(s) and output should be defined precisely.
  • Each step in the algorithm should be clear and unambiguous.
  • Algorithms should be most effective among many different ways to solve a problem.
  • An algorithm shouldn’t include computer code. Instead, the algorithm should be written in such a way that it can be used in different programming languages.
  • An algorithm should be finite.

Summary

Data structures and algorithms are very important in software engineering and requires practice and in depth study to understand and apply in real world applications.

In my next article we will explore each data structure in details and go ahead to implement algorithms with these data structures, to show its practical application in real world scenarios.

--

--