Byte Size Info: Data Structures

Byte Size Info:  Data Structures

Those with a formal education in computer science usually learn about data structures while they’re learning C/C++ and then implement them somewhere down the line. Whereas, those who are self taught will usually jump straight into using data structures (example arrays) and then decide to read about these more formally before an interview.

Before understanding the different types of data structures, it is worthwhile to delve into the meaning of the words,”data” and “structure”.

What is data?

The words data and information are used interchangeably, but they mean slightly two different things. Data is a collection of values and facts which via processing  become information. Information is data that is represented in binary for efficient processing. Generally when we talk about data we are referring to information such as images, files, characters, numbers, sound, video etc i.e. digital data. Digital data is represented in a binary number system ( combination of ones and zeros) in its most basic form.

The different data types

There are different types of data which are used to represent information. The common ones are:

  • Primitive data types include integers, booleans, strings, characters.
  • Composite data types are a collection of primitives for example arrays and objects.
  • Abstract data types such as stacks and queues are defined by their behavior and the set of operations that can be used on them. For example insertion, deletion and retrieval operations.

What do we mean by data structure?

The systemic organization and classification of data is something common across different academic fields. Even in our daily lives systems, organizations and collections help us conduct our lives with more easy and meaning. Computing becomes easier by categorizing data into different types of structures. Data structures are a specific way of organizing data. The information in a data structure can be used by retrieving it, deleting it, inserting more data or manipulating it another way.

Data structures

The 2 types of data structures

Before we delve into data structures, it is important to note that there are 2 categories:

  1. Linear data structures: In a linear data structure all the elements are sequentially arranged one after the other. Therefore each element is connected to elements before and after it as in a queue. These are organized as a single level and users can traverse through the elements of a linear data structure in a single run. Linear data structures are mainly used in software applications.
  2. Non-Linear data structures:  In a non-linear data structure, elements are not organized sequentially. For example trees and graphs. These have multiple levels and are a bit harder to implement compared to linear data structures. You cannot traverse through the elements of a non-linear data structure in a single run. These data structures are mainly used in machine learning and image processing.

Linear data structures can further be categorized into the following:

  • Arrays
  • Stack
  • Queue
  • Linked list
  • Hash Tables (can be linear or non-linear data structures)

Non-linear data structures have the following sub-categories:

  • Graphs
  • Trees
  • Hash Tables (can be linear or non-linear data structures)

In the next blog we will discuss each one of these data structures starting off with the Stack linear data structure.

Sign up & Join Our Newsletter!

Subscribe & keep up with the latest news and updates from CodeCast

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.