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 »

Exception handling in Java (with examples)

Exception handling is a must-use tool for programmers. It avoids the uncomfortable app crashes that we see often when using certain software. So, let’s get to it. What is an Exception? An exception in a programming language is an unexpected event that stops the current flow execution of a program. Some examples of exceptions are:

Exception handling in Java (with examples) Read More »