Data structures

Graph Data Structure applications: solving a real-world problem

The graph data structure can be used to solve many real-world problems. In this post, you will see one of the graph data structure applications. To solve the problem I’m showing you here, you can use the implementation for the undirected simple graph data structure. Graph ADT operations When you want to use a data […]

Graph Data Structure applications: solving a real-world problem Read More »

Stack data structure implementation in Java (using linked lists)

The Stack data structure implementation is studied in most Computer Science courses on Data Structure and Algorithms. In this post, you will learn one implementation of this important data structure. What is a Stack? A stack is a linear data structure that follows the Last In First Out (LIFO) principle. This means that the last

Stack data structure implementation in Java (using linked lists) Read More »

Queue data structure implementation in Java (using linked lists)

The Queue data structure implementation is studied in most Computer Science courses on Data Structure and Algorithms. In this post, you will learn one implementation of this important data structure. One of my favourite books to study data structure is Introduction to Algorithms by Cormen. What is a Queue A queue is a linear data

Queue data structure implementation in Java (using linked lists) Read More »

General Tree Data Structure: implementation and usage in Java

The General Tree data structure is one of the classic data structures studied in a Data Structure and Algorithms course. You will learn here how to implement the general tree data structure. So, let’s start by stating what do we mean by General Tree. General Tree Definition A tree is a mathematical model. Therefore, it

General Tree Data Structure: implementation and usage in Java Read More »