Java

General Tree Data Structure Example: Printing levels of the Tic-tac-toe Game Tree

One of the General Tree Data Structure example of application is to create game trees. In this post, you will learn how to print some levels of the game tree for the popular game Tic-tac-toe. Tic-Tac-Toe The Tic-tac-toe game consists of a 3×3 board. One player place X’s on the board and the other one

General Tree Data Structure Example: Printing levels of the Tic-tac-toe Game Tree 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 »