Skip to content

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.

Notifications You must be signed in to change notification settings

thomasleavy/JavaDataStructuresAndAlgorithms

Repository files navigation

Data Structures and Algorithms Examples

data structures and algorithms

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.

Contents:

ArrayList and Stack (ArrayListAndStack):

  • Implementation of a stack using an ArrayList for managing size.

ArrayQueue (ArrayQueue):

  • Implementation of a queue using an array with enqueue, dequeue, and peek operations.

Binary Search Tree (BinarySearchTree):

  • Implementation of a binary search tree with uses for insertion, deletion, and traversal.

Double Linked List (DoubleLinkedList):

  • Implementation of a doubly linked list with nodes containing references to previous and next nodes.

Recursion (Recursion):

  • Examples demonstrating recursive algorithms, including factorial computation, Fibonacci sequence, and recursive traversal.

LinkedList Queue (LinkedListQueue):

  • Implementation of a queue using a linked list with operations for enqueue, dequeue, and peek.

Singly Linked List (SinglyLinkedList):

  • Implementation of a singly linked list with operations for insertion, deletion, traversal, and managing the size of the singly linked list.

Dijkstra Algorithm (DijkstraAlgorithm):

  • Implementation of a Dijkstra Algorithm that finds the shortest path between nodes in a weighted graph, computing the paths from a source.

Usage:

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.

Contributions:

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!

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages