C-Sharp icon indicating copy to clipboard operation
C-Sharp copied to clipboard

Add more data structures

Open siriak opened this issue 6 years ago • 32 comments
trafficstars

Feel free to propose and/or implement new data structures, I will add them to the list below :) List of data structures that would be great to see in this repo: Basic:

  • [x] Sorted List

Heaps:

  • [ ] Fibonacci heap
  • [ ] Pairing heap

Trees:

  • [x] Scapegoat tree
  • [ ] Finger tree
  • [ ] Van Emde-Boas tree
  • [ ] Suffix trie
  • [ ] B-tree
  • [ ] B+ tree
  • [ ] Interval tree
  • [x] Red-Black tree
  • [x] AVL-tree
  • [ ] Splay-tree
  • [ ] Merkle tree
  • [ ] R-tree
  • [ ] KD-tree
  • [ ] Hash array mapped trie
  • [ ] Ball tree

Probabilistic:

  • [ ] Quotient filter

Other:

  • [ ] Rope
  • [ ] Skip list
  • [ ] Zipper
  • [x] Disjoint set
  • [ ] Work Stealing Queue
  • [x] Inverted index
  • [ ] Gap buffer
  • [ ] Nested sets
  • [ ] Half-Edge data structure
  • [x] Unrolled linked list

siriak avatar Sep 06 '19 13:09 siriak

Hi @siriak, I think that Binary search tree should also be in the list, because it is easier to implement than AVL and Red-black trees. However it shares a lot of commonalities with them and this makes BST helpful when someone is starting to learn about trees to have a basic version.

ivanruski avatar Mar 29 '20 13:03 ivanruski

Hi @ivanruski, sure thing! I've added Binary search tree to the list.

siriak avatar Mar 29 '20 14:03 siriak

I could implement binary search tree and segment tree.

antonykamp avatar Sep 26 '20 08:09 antonykamp

Looks like the stacks are done, should update the list.

jlechem avatar Oct 13 '20 16:10 jlechem

@siriak I would like to contribute. any open issues ?

rohansp avatar Oct 19 '20 05:10 rohansp

@rohansp you can take any algorithm/data structure that's not implemented yet and implement it.

siriak avatar Oct 19 '20 06:10 siriak

How to figure out which ones are implemented already?

On Mon, Oct 19, 2020 at 1:36 AM Andrii Siriak [email protected] wrote:

@rohansp https://github.com/rohansp you can take any algorithm/data structure that's not implemented yet and implement it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheAlgorithms/C-Sharp/issues/112#issuecomment-711663511, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVHOGE5QKPFCTNFHP2COZLSLPM75ANCNFSM4IUIZ7FQ .

rohansp avatar Oct 19 '20 13:10 rohansp

You can check a list in README.md or browse directories in the repository and see in files. Also, here not implemented data structures are unchecked.

siriak avatar Oct 19 '20 15:10 siriak

I want to contribute in AVL trees.

mondalshubham1 avatar Oct 23 '20 15:10 mondalshubham1

Looks like AVL trees isn't done yet and I'm working on an implementation that I can contribute if it isn't done by the time I'm finished. Also going to take on Red-Black trees after I'm done with this.

arajaram avatar Feb 12 '21 23:02 arajaram

I can implement Fibonacci heaps

CyberMobius avatar Feb 24 '21 04:02 CyberMobius

@arajaram @CyberMobius cool, go ahead!

siriak avatar Feb 24 '21 20:02 siriak

@siriak Do you think an implementation of a dynamic array would be worthwhile to add?

gedkott avatar Mar 17 '21 07:03 gedkott

@gedkott IMO it'd be nice to have a dynamic array for educational purposes even though List<T> exists, which is the same thing.

siriak avatar Mar 17 '21 12:03 siriak

@siriak That makes sense. Linked lists are part of the project already, but dynamic arrays would be a good educational addition to the project given the performance and implementation differences.

I have someone who is learning how to write a dynamic array now and I would like to have them contribute their complete solution here when ready. I'll be in touch as we progress. Let me know if there is anything we should consider as we work on it together.

Thanks for your leadership on this project!

gedkott avatar Mar 17 '21 16:03 gedkott

List (Dynamic Array)

phougatv avatar Jun 20 '21 06:06 phougatv

Hi, I'd like to implement Scapegoat tree.

mime8 avatar Jul 27 '21 17:07 mime8

List (Dynamic Array)

I would like to contribute. Do I need specific permission to create a branch and raise a PR?

phougatv avatar Jul 28 '21 04:07 phougatv

@mime8 cool, go ahead! @phougatv you don't need any permission to contribute, just make a fork, work there and make a PR once you are done :)

siriak avatar Jul 28 '21 16:07 siriak

@siriak Hi, do you need a graph implementation in the Data Structures section? (Via 2D matrix)

kolosovpetro avatar Aug 09 '21 19:08 kolosovpetro

@kolosovpetro Hi, definitely :)

siriak avatar Aug 09 '21 20:08 siriak

@siriak , hi again! I'll create a PR with Scapegoat tree implementation either today or early next week. Sorry for long absence.

mime8 avatar Sep 11 '21 21:09 mime8

Hi, I would like to work with Fenwick tree (#245)

Leefrost avatar Oct 05 '21 07:10 Leefrost

I can take Pairing heap [#248] and Unrolled linked list [#251]

Leefrost avatar Oct 06 '21 18:10 Leefrost

I'd be happy to do a bloom filter

slorello89 avatar Oct 09 '21 14:10 slorello89

If no one takes already Inverted index, I will do it [#262]

Leefrost avatar Oct 09 '21 20:10 Leefrost

Hey @siriak, what do you think about Matrix (Tensor) data structure with corresponding operators, like element-wise arithmetics, multiplication, determinant, invert e.t.c?

kaydotdev avatar Oct 11 '21 19:10 kaydotdev

@antonAce that's a nice idea, I like it :)

siriak avatar Oct 12 '21 05:10 siriak

I'd like to work on B-tree next, if that's okay.

mime8 avatar Nov 11 '21 16:11 mime8

BTW, I think the description of this thread should be updated. Some of the data structures mentioned there are already implemented.

mime8 avatar Nov 11 '21 16:11 mime8

@mime8 I think I've updated it correctly, please let me know if something else was already implemented

siriak avatar Nov 12 '21 06:11 siriak

@siriak , I see that SortedList and AVL tree were already implemented.

mime8 avatar Nov 12 '21 08:11 mime8