This repository contains Java implementations of different data structures and algorithms. Each one shows a different concept. It is intended to show how these elements work and how they're implemented in Java.
- Implementation of a stack using an ArrayList for managing size.
- Implementation of a queue using an array with enqueue, dequeue, and peek operations.
- Implementation of a binary search tree with uses for insertion, deletion, and traversal.
- Implementation of a doubly linked list with nodes containing references to previous and next nodes.
- Examples demonstrating recursive algorithms, including factorial computation, Fibonacci sequence, and recursive traversal.
- Implementation of a queue using a linked list with operations for enqueue, dequeue, and peek.
- Implementation of a singly linked list with operations for insertion, deletion, traversal, and managing the size of the singly linked list.
- Implementation of a Dijkstra Algorithm that finds the shortest path between nodes in a weighted graph, computing the paths from a source.
Each Java file (*.java
) can be compiled independently and run, to see the functionality of the data structure or algorithm. These examples are resources for understanding how to implement and use data structures and algorithms efficiently.
Feel free to provide improvements, bug fixes, or more examples (e.g., bubble sort, maps, graphs, etc.) to enhance the value of this repository. Pull requests are welcome!