Giter Club home page Giter Club logo

dsa's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dsa's Issues

Documentation about algorithms

Hi guys,
Now a day we have all algorithms, but we don't have the documentation about each one of them, I think to make some changes to the folder.

  • Move all algorithms to the algorithms folder
  • Create a docs folder, it will contain the docs of the algorithms

What are you thinking?

Problem

The problem is that reviewing PR is to late

Wanted to add Prim's algorithum in C Language

Hey,
I saw that there is absence of the one of the famous Prim's algorithm in Graph->C-or-CPP so can i add this algorithm basically Prim's algorithm is a way to implement the Minimal Spanning Tree (MST) means to find the minimum cost way to cover all the vertex.
Please Assign Me

We should encourage that submisssions have tests

Our GitHub Actions should run testing engines for the various programming languages and we should encourage all new submissions come with tests... #170 will add more tests to the list below.

% pytest --doctest-modules .

============================= test session starts ==============================
platform linux -- Python 3.9.4, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /home/runner/work/DSA/DSA
collected 11 items

arrays/python/count-inversions.py .                                      [  9%]
multiplication/python/karatsuba.py ....                                  [ 45%]
scheduling/python/interval-scheduling.py .                               [ 54%]
sorting/python/bubble-sort.py .                                          [ 63%]
sorting/python/insertion-sort.py .                                       [ 72%]
sorting/python/quick-sort.py .                                           [ 81%]
sorting/python/selection-sort.py .                                       [ 90%]
strings/python/palindrome.py .                                           [100%]

============================== 11 passed in 0.11s ==============================

Other opportunities:

  • linked-lists/Python/singly.py
  • searching/python/binary-search.py
  • searching/python/jump-search.py
  • searching/python/linear-search.py
  • strings/python/palindrome.py #172

Kaprekar number in CPP

Hey @ming-tsai ,
I wanted to add a program that can tell you whether a number is kaprekar of not
Example:
Input: 9
Output: 9 is a kaprekar number
Explanation: 1: First do the square of 9 is 81
2: divide the square of 9 in the equal parts or r=l+1 l=n/2
3: If the sum of the two divided number i.e. 8+1=9 then its is a kaprekar number else not a kaprekar number
Please assign me this issue
Thanks

Good or Bad String in C++

Hey,
I wanted to add a program which let you know whether the string is good or bad
Criteria:
If the string contain continuously more than 5 vowel or continuously more than 3 constant then it is a bad string else it is a good string
Question of GeeksforGeeks Platform: Bad or Good String

Programming languages reviewers on repo

We are looking an open source reviewer for this repo, if you have passion on it, please let me know if you want help us and write on below.

Rule for be a reviewer for this repo

  1. You are passion on coding
  2. You have knowledge or experience on some programming language, example: C#, Javascript...
  3. You have contributed on this repo, so that you could understand the review process.

You will not be paid, so you should have passion working on it.

Questions & Answer

  • After you joined to be a reviewer, but after that you don't want to be any more, what should you do?
    Just let me know and I will remove you as reviewer.

New labels for different languages

now all the new programs are labeled as enhancement

because of the obvious nature of this repository, we would be having different contributions for same/similar algorithms and data structures so wouldn't it be better to have different labels for different languages like one for C++, one for python etc. so that it becomes easier to review and manage PR's and issues about implementation of different algorithms.

for example : -
let's say I decide go to pull requests section and decide to review all contributions done in C++ language then instead of going over each and every pull request to see which language was used there, I can just filter the PRs to just show me the ones with C++ label.

Add Makefiles to Source-Codes (especially in C/C++)

In C/C++, it's especially important for one to properly use compilers to get similar outputs, across platforms.

It's especially useful in cases where the user just has to run make to compile and execute / interpret the program, rather than search for 'how to compile X' or 'how to run Y'. For a lot of these cases, a Makefile defining the build recipe would assist a lot, along with automation directly from it.

Proposal for improved naming scheme

Since the programs presently aren't kept in it's own directory, it would make sense to have an organisation for programs, by keeping it in its own directory (PLEASE GO THROUGH PROPOSED SOLUTIONS IN THE BOTTOM), as that provides better isolation than just filenames.
For example: Consider the tree of directory DSA/arrays/c-or-cpp @ cdaefaf

DSA/arrays/c-or-cpp
├── count-inversions.cpp
├── dutch-flag-algo.cpp
├── left-rotation.cpp
└── shift-negatives.cpp

Is easy to understand but difficult to organise, compared to a directory structure, that looks like this

DSA/arrays/c-or-cpp
├── count-inversions
│   └── main.cpp
├── dutch-flag-algo
│   └── main.cpp
├── left-rotation
│   └── main.cpp
└── shift-negatives
    └── main.cpp

For now, this organisation works, but for the future, potentially even the not-so-far future it wouldn't work out well, when it would contain >50 programs all in a single directory, which would also make it easier for programs to have it's own Makefiles or other program-specific settings as it gets bigger.

It could change the folder naming also, but it is, in my opinion, a better plan for the future so that for some problems, a program could be it's own isolated organised project.

Pros and Cons

  • PRO: Better organisation of problems & programs.
  • PRO: Allows for proper program conventions, for source code files.
  • PRO: Allows for organized test files to be added to it.
  • PRO: Easily allow inclusion of associative files for the project like Makefiles (for C/C++), requirements.txt (Python), package.json (NodeJS), Cargo.toml (Rust), go.mod (Go) and the like.
  • CON: Potentially more difficult repository to go through (though this can be worked out with more polished set of instructions for contribution).
  • CON: Could become difficult for newcomers unless we categorize what contribution is considered simple and what's not.

Proposed solutions:

  1. Modification of all the programs to conform to category/language/problem/(program/app/main).ext instead of category/language/problem.ext

    Pros and cons

    • PRO: Could be beneficial in the long run
    • CON: More tedious. Someone has to work on this.
    • CON: Potentially error-prone
  2. Extension of the file and naming specifications to also accommodate for complex or more elaborate programs also, which would let a specific class of programs (especially ones that comes with Makefiles and the like), be easier to add as a contribution.

    Pros and cons

    • PRO: Easier to implement.
    • PRO: Could allow for more classes of more complex programs being allowed for it, along with keeping support for simpler ones.
    • CON: Could make the repository files more fragmented.
    • CON: Could make it difficult for new-comers to understand how the new naming-scheme works unless it's explained well (I could put time into working the instructions for that also).

[Enhancement] Solution folder and Github Action

Actually, we have a problem, that we don't know if the file it's building correctly or not, so my recommendation is below.

  1. Reformation of directories
DSA
  | c-or-cpp
    | readme.md -> should create an readme for the index
    | solution file or project
    | search
      | linear-search.cpp
      | binary-search.cpp
    | sorting
      | some-sort.cpp
  | java
    | readme.md -> should create an readme for the index
    | solution file or project
    | search
      | linear-search.java
      | binary-search.java
    | sorting
      | some-sort.java
  1. Create Github action for building the solutions

Waiting for your suggestions @Arsenic-ATG, @paulsonjpaul, and @akrish4

Add Linked List

Hi

This issue to add Linked List code with cpp

My LL has functions : [insert at beginning, insert at end, insert after a position, insert before a position, print, length]

I will added more functions for search and delete day by day

I hope to like it

Thanks

Request

Hi

I hope all are well

I have a request, I want to be a reviewer in this great repository.

I this possible I will be happy

Thanks

Issue and PR Template

I think we should add some templates for Issues and Pull Requests. This will help in having some clarity and a consistent format of issues and PRs. For eg. in issues we can create a template for bug report in any of the algorithm and for PRs we can have algorithm details like name etc and a link to it's implementation (if possible) so that reviewer(s) can verify the quickly.

Here are some of the possible templates we can add though adding all of these is not necessary I think.

Issue

Pull Request

  • PR template

Suggestion

Hi

I suggest to add a GitHub action to the repository, to display a welcome message for contributor who opens an Issue or PR

If the idea is good, I can do it, I have this action, and I can add it to work,

If you you agree, and assigned it to me, Please tell me the message you want to display it.

Thanks

Need to add folder for "trees"

I wanted to add some code for Tree data structure, but as no folder for tree exists I want to make one!!
So if you don't mind I would like to create it!!

Suggestion !

Make readme.md file more readable and attractive so that people can easily understand .

Fix - Need for updation of readme.md

File Location - DSA/strings/
File Name - README.md

I think it would be good if the statement inside c# section which states "You could use any online IDE (for an example .net Finddle) to test them." be shifted inside file as a comment or included inside the repository README.md (main).

Adding circular queue

Hi
This issue to add a Circular Queue using Linked List in cpp
I will open a PR
Thanks

Typos discovered by codespell

% codespell --ignore-words-list=ans,nnumber --quiet-level=2

./README.md:14: seperated ==> separated
./strings/c-or-cpp/string-tokeniser.cpp:27: delimeter ==> delimiter
./strings/js/palindrome.js:4: alpha-numeric ==> alphanumeric
./sorting/java/quick-sort.java:2: choosen ==> chosen
./sorting/java/counting-sort.java:4: algortithm ==> algorithm
./sorting/java/merge-sort.java:12: Funtion ==> Function
./sorting/c-or-cpp/bubble-sort.cpp:21: swaping ==> swapping
./linked-lists/c-or-cpp/Insert_and_delete_beginning.c:18: Intialize ==> Initialize
./linked-lists/c-or-cpp/Insert_and_delete_beginning.c:37: beggining ==> beginning
./graphs/c-or-cpp/bellman-ford.cpp:80: weigth ==> weight
./stacks/README.md:5: Paranthesis ==> Parenthesis
./searching/c-or-cpp/linear-search.cpp:22: inputed ==> inputted
./searching/c-or-cpp/linear-search.cpp:24: inputed ==> inputted

[Enhancement] Reformatting directory tree of the repository

I think the folders in the repo should be ordered on the basis of algorithms instead of programming language.

example :
currently we have folder in this kind of structure

DSA
| - > Searching 
         | -> C or Cpp 
                  |-> linear search.cpp

whereas, it should have the format

DSA
| - > Searching 
         | -> linear search 
                  |-> linear search.cpp

like this, it would be easier for both contributors and maintainers to keep track of what algorithms has been implemented in what all languages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.