Skip to content

仓库 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 搜索 Tree (Binary搜索Tree):

  • 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. 拉取请求 are welcome!

关于

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

0 stars

关注者

1 watching

复刻s

发布

贡献者

Languages