# Data structures

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

We can use the General Tree Data Structure in several ways. One of them 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 places X’s on the board […]

## General Tree Data Structure implementation in C# (with examples)

The Tree data structure has many applications in Computer Science. In this post, you will learn how to implement the general tree data structure in C#. So, let’s start by stating what do we mean by General Tree. General Tree Definition A tree is a mathematical model. Therefore, it is defined in Discrete Mathematics as:

## Using the List data structure in C#

The List data structure is one of the most used data structures in any programming language. Therefore, it is important to learn what it is and how to use it. What is a data structure? In Computer Science, we consider a data structure as a way to organize data to enable us to efficiently access

## Using the Queue Data Structure in C# (with examples)

The Queue data structure is used in the solution of many different problems. In this article, I’ll explain what a queue is, what are the methods available for you to use and one example of how we can use it to solve problems. As you should remember, in programming, especially in Object-Oriented Programming, we aim

## Using the Stack data structure in C# (with examples)

The Stack data structure has many applications in programming. In this post, you will see three examples of using the Stack data structure in C# to solve real-life problems. Stacks in the real world Programming is about modelling real-life situations. The use of stacks is not the exception. The Tower of Hanoi is a game

## Using the Graph Data Structure to solve real-world problems in C#

The graph data structure has many applications. This post will teach you how to use it to solve a real-world problem. 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 structure to solve problems,

## Undirected Simple Graph Data Structure Implementation in C#

The Graph Data Structure is widely used in programming. In this post, you will learn one of the implementations of the TDA and an example of how to use it. To use a graph, you first have to understand when and why you can use it. As in other topics, you will find in this

## Queue data structure implementation in C# (using linked lists)

The Queue data structure is studied in most Computer Science courses on Data Structure and Algorithms. In this post, you will learn the two main implementations of this important data structure. What is a Queue A queue is a linear data structure that follows the First In First Out (FIFO) principle. This means that the

## Stack data structure implementation in C# (using linked lists)

The Stack data structure is studied in most Computer Science courses on Data Structure and Algorithms. In this post, you will learn one C# 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

## 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