This repository is dedicated to practicing and implementing various data structures using the Go programming language.
- Linked Lists: Implementations of singly, doubly, and circular linked lists.
- Stacks: Implementations of stacks using linked lists and arrays.
- Queues: Implementations of simple and double-ended queues (deques).
- Binary Trees: Implementations of binary search trees (BST), AVL trees, and red-black trees.
- Graphs: Implementations of graphs using adjacency lists and adjacency matrices.
- Hash Tables: Implementations of hash tables with collision handling.
The project is organized into directories, each corresponding to a specific data structure:
data-structures/
├── linked-lists/
│ ├── singly_linked_list.go
│ ├── doubly_linked_list.go
│ └── circular_linked_list.go
├── stacks/
│ ├── stack_linked_list.go
│ └── stack_array.go
├── queues/
│ ├── queue_linked_list.go
│ └── deque.go
├── trees/
│ ├── binary_search_tree.go
│ ├── avl_tree.go
│ └── red_black_tree.go
├── graphs/
│ ├── adjacency_list.go
│ └── adjacency_matrix.go
└── hash_tables/
└── hash_table.go
-
Clone the repository:
git clone https://github.com/ibcaos/data-structures.git cd data-structures
-
Explore the directories and files to see the implementations of the data structures.
-
Compile and run the examples:
go run linked-lists/singly_linked_list.go
Contributions are welcome! If you wish to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-data-structure
). - Make your changes and commit them (
git commit -am 'Add new data structure'
). - Push your changes (
git push origin feature/new-data-structure
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any questions or suggestions, please open an issue in the repository or contact [email protected].
Thank you for your interest in this project!