This Project aims to port/build well known and commonly used data structures to GO.
This library uses reflection for every method call to verify if the type the element to add is same as other elements in the list.
- ArrayList
- Doubly LinkedList
- Skip List
- Hash Map
- Linked Hash Map
- Tree Map
- HashSet
- Stack
- Linked Queue
- DeQue
- Blocking Queue
- Priority Queue
- Binary Tree
- Binary Search Tree
- AVL Tree
- Red Black Tree
- N-Ary Tree
- Segment Tree
- Trie
- B-Tree
- Heap
- Graphs
- Adjacency List
- Adjacency Matrix
- Hash List
- Hash Table
- Hash Tree
- Bloom Filters
- Compressed Trie
- Hash Trie
- Stream
go get -u github.com/nsnikhil/go-datastructures
- Fork it (https://github.com/nsnikhil/go-datastructures)
make setup
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
1Concurrent search dose not provide enough performance benefits and also the benchmark test for the same sometimes gets into infinite loop. 2In heap one can add two elements even though the comparator type and element type is not same.
Copyright 2022 Nikhil Soni
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.