Skip to content

myers-jacobandrew/Data-Structure-Implementations

Repository files navigation

Java Implementations

This repository contains Java implementations for various data structures and algorithms.

BreadthFirstSearch

BreadthFirstSearch is an algorithm for traversing a graph or tree data structure. The algorithm visits all the vertices of the graph or tree at a given depth before moving on to the vertices at the next depth level.

Bucket Sort

BucketSort is a sorting algorithm that works by distributing the elements of an array into a number of buckets. Each bucket is then sorted individually, and the sorted buckets are concatenated to produce the final sorted array.

DepthFirstSearch

DepthFirstSearch is an algorithm for traversing a graph or tree data structure. The algorithm starts at the root node and explores as far as possible along each branch before backtracking.

Dijkstra's Shortest Path

Dijkstra's Shortest Path is an algorithm for finding the shortest path between two nodes in a graph. The algorithm works by maintaining a set of unexplored nodes, and a set of explored nodes. At each step, the algorithm chooses the unexplored node with the smallest known distance to the source node, and adds it to the explored set.

Double Hash

Double Hash is a hash table implementation that uses two hash functions to compute the index of an item in the table. If a collision occurs, the algorithm uses a second hash function to find an alternate index.

Doubly-Linked List

Doubly-Linked List is a data structure that consists of a sequence of nodes. Each node contains a reference to the next node in the sequence, and a reference to the previous node. This allows for efficient traversal of the list in both forward and backward directions.

Max Heap

Max Heap is a binary tree data structure in which each parent node is greater than or equal to its child nodes. The root node contains the largest element in the tree.

Merge Sort

Merge Sort is a divide-and-conquer algorithm that works by recursively dividing an array into two halves, sorting each half, and then merging the sorted halves to produce the final sorted array.

Queue

Queue is a data structure that works by maintaining a first-in, first-out (FIFO) ordering of elements. The Queue interface defines methods for adding elements to the back of the queue, removing elements from the front of the queue, and checking the size of the queue.

RedBlackTree

RedBlackTree is a binary search tree that maintains a balance by using a set of rules to determine when to restructure the tree. These rules ensure that the tree remains balanced, and that the worst-case time complexity of operations such as insertion and deletion is O(log n).

Splay Tree

Splay Tree is a self-adjusting binary search tree that rearranges its structure to bring frequently accessed elements closer to the root. This results in faster access times for frequently accessed elements.

Stack

Stack is a data structure that works by maintaining a last-in, first-out (LIFO) ordering of elements. The Stack interface defines methods for adding elements to the top of the stack, removing elements from the top of the stack, and checking the size of the stack.

About

various data structures implemented in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages