DEV Community

Cover image for Intro to Data Structures
Latricia Nickelberry
Latricia Nickelberry

Posted on

Intro to Data Structures

I have begun the process of studying data structures and algorithms. I would like to share what I have been learning in hopes that other people can learn as well.

I am going to start off by discussing data structures and give a brief overview of what it is. The definition of data structures according to Wikipedia is a data organization, management, and storage format that enables efficient access and modification. Basically, its a group of data that will be organized in a certain way, so that the data can be used efficiently.

Algorithms on the other hand is just a step by step process of how to do a certain task. In this blog I will only discuss data structures.

Here is a list of various data structures:

  1. Array- contains a group of elements. Usually of the same data type such as an integer or string. It is usually used because it can be easily sorted or searched.
  2. Linked list- it is a linear collection of data and the order is not by its specific physical placement in memory. Each element has a pointer that points to the next. Linked list consists of a collection of nodes.
  3. Stack-is a collection of elements that are placed one on top of the either. It has two operations that are very helpful push which adds an element to the stack and pop which removes the most recent element.
  4. Queue-is a collection of entities that is kept in a sequence. The queue can only be modified by adding an element to the rear which is called enqueue and removing an element from the front which is called dequeue.
  5. Binary tree-is a tree data structure that each node has two children a right and left child.
  6. Heap-is a special tree that is binary. A heap can have two types max-heap which is the root node must be bigger than all of its children and min-heap is just the opposite which means that the root node must be less than all of its children.
  7. Hashing- is a process of mapping keys into a hash table and this is done by using a hash function.
  8. Graph- a data structure made up of nodes or vertices and edges are the connections between the nodes. Usually the representation of a graph would be of nodes represented by circles and edges as lines between the circles.
  9. Matrix- represents a collection of numbers and they are arranged by rows and columns.

This is what I got so far. In my upcoming blogs I will go into more detail for each data structure.

Happy coding!

Top comments (0)