pydatastructs icon indicating copy to clipboard operation
pydatastructs copied to clipboard

Prospective Ideas

Open Smit-create opened this issue 4 years ago • 11 comments

Some of the ideas to start working on: Adding a few basic and necessary functions:

  1. upper_bound: (similar to that of cpp's upper_bound) that should work on sorted OneDimensionalArray.
  2. lower_bound: (similar to that of cpp's lower_bound) that should work on sorted OneDimensionalArray
  3. is_sorted: To check that a given OneDimensionalArray is sorted or not.
  4. binary_search: To search for a given key in sorted OneDimensionalArray.

Adding few Datastructes:

  1. Adding a class of multiset (similar to cpp's multiset)
  2. Adding a class of Fenwick tree
  3. Adding a class of Sparse Table
  4. Adding a class of StringHashFunction
  5. LCA for DAG/tree

Some more ideas on strings and Graphs can also be found here: https://github.com/codezonediitj/pydatastructs/wiki/Planned-Features-for-v0.0.1

The list will be updated based on the progress of the above ideas. We don't assign issues to any individual so whoever is willing to work on any of the above ideas (or on your own idea please let us know what you are working on) should discuss how he/she is going to design the API of the function/classes and how will it be useful. For example, if I am willing to work on adding binary_search for sorted ODA, then I would show its working in the comments below as:

binary_search(array, start, end, key, cmp=None):
    # its algo (not necessary to show here in comments just show how the function/class will look like)
    return True if found else False

Smit-create avatar Mar 11 '21 05:03 Smit-create

I would like to work on is_sorted and binary_search as part of my contribution for GSSOC'21. For example,

is_sorted(array, start,end):
          # algo 
          return True if sorted else false

Nora2412 avatar Mar 11 '21 06:03 Nora2412

Yes, you can try raising a PR for that by adding the said functions under https://github.com/codezonediitj/pydatastructs/blob/master/pydatastructs/linear_data_structures/algorithms.py

Smit-create avatar Mar 11 '21 06:03 Smit-create

I would like to work on the upper_bound and lower_bound functions which would be a part of the algorithms.py file, as part of GSSoC'21 The function definition goes like-

def upper_bound(array, start, end, value):
           # algo (returns the index of the upper bound of the given value from start to end indices of a OneDimensionalArray)
           return index
def lower_bound(array, start, end, value):
           # algo (returns the index of the lower bound of the given value from start to end indices of a OneDimensionalArray)
           return index

sHiVaNgI821 avatar Mar 12 '21 03:03 sHiVaNgI821

Yes, please raise a PR for the same.

Smit-create avatar Mar 12 '21 03:03 Smit-create

I would like to work on binary search.

Simar05519 avatar Mar 15 '21 09:03 Simar05519

I would like to work on binary search.

You can raise a PR for that since no one has worked for it till now.

Smit-create avatar Mar 15 '21 09:03 Smit-create

ok

On Mon, Mar 15, 2021 at 3:09 PM Smit Lunagariya @.***> wrote:

I would like to work on binary search.

You can raise a PR for that since no one has worked for it till now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/codezonediitj/pydatastructs/issues/343#issuecomment-799272148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQBFEQ7EBQHUYCWC6WNSOMTTDXIWVANCNFSM4Y7RDPIA .

Simar05519 avatar Mar 15 '21 09:03 Simar05519

Hello, @Smit-create I would like to work on KMP and Fenwick tree. Can I start working on it?

vi-hna-ja avatar Apr 13 '21 13:04 vi-hna-ja

Sure!

Smit-create avatar Apr 14 '21 14:04 Smit-create

I would like to work on the sparse table class which would be a part of miscellaneous data structures, as part of my contribution for GSSoC'21

sHiVaNgI821 avatar May 10 '21 18:05 sHiVaNgI821

I would like to work on lowest_common_ancestor (LCA for DAG/Tree) function which would be a part of the algorithms.py file in the graphs directory, as part of my contribution for GSSoC'21. The function definition goes like:

def lowest_common_ancestor(graph: Graph, vertex1: str, vertex2: str, algorithm: str) -> str: 
             # algo
             returns lca_vertex

sHiVaNgI821 avatar May 17 '21 22:05 sHiVaNgI821