This repository contains different C# projects to demonstrate how algorithms and data structures work. Each assignment focuses on a specific topic, such as sorting, searching, shuffling, or working with trees. There’s also a project where a maze is solved through a search algorithm.
- Maze Solver
- Big O Notation Examples
- Fisher-Yates Shuffle
- Data Structures Examples
- Sorting Algorithms
- Searching Algorithms
- Tree Structures
Assignment 4
This project uses Depth-First Search (DFS) to solve a maze. The AI starts at the beginning and finds its way to the exit, avoiding walls.
- The AI uses DFS to explore paths.
- The solution is animated so you can watch the AI move through the maze.
- It keeps track of visited spots to avoid getting stuck in loops.
- DFS works like a “pre-order traversal” in trees.
- The AI uses backtracking to explore different paths.
- MazeSolver.cs
- README_MazeSolver.md
Assignment 1
This project shows examples of how fast different algorithms run based on the size of the input.
- O(1): Always takes the same amount of time.
- O(n): Takes more time as the input gets bigger.
- O(n²): Takes even longer because of nested loops.
- Learn how to measure how “big” or “slow” an algorithm is.
- Compare performance for different inputs.
- BigONotationExamples.cs
- README_BigONotation.md
Assignment 2
Uses the Fisher-Yates Shuffle to randomly mix up items in a list.
- Shuffles items so each order is equally likely.
- Does this efficiently without needing extra memory.
- How randomness works in programming.
- The algorithm is fast and works in O(n) time.
- FisherYatesShuffle.cs
- README_FisherYatesShuffle.md
Assignment 3
Explains common data structures, like:
- Stacks
- Queues
- Linked Lists
- Dictionaries
- Shows how to add, remove, and look at items.
- Explains how fast these operations are.
- DataStructures.cs
- README_DataStructures.md
Assignment 5
Demonstrates different ways to sort data, including:
- Bubble Sort
- Insertion Sort
- Selection Sort
- HeapSort
- Quick Sort
- Merge Sort
- Times how long each algorithm takes to finish.
- Compares all the algorithms to see which one is best.
- SortingAlgorithms.cs
- README_SortingAlgorithms.md
Assignment 6
Shows how to search for a specific item in a list using:
- Linear Search
- Binary Search
- Interpolation Search
- Tests how fast each method works.
- Uses the same dataset to compare results.
- SearchingAlgorithms.cs
- README_SearchingAlgorithms.md
Assignment 7
Shows how to use trees to organize data.
- Loads data from a file.
- Sorts the data first.
- Builds a tree from the sorted data.