TheAlgorithms / C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
https://thealgorithms.github.io/C-Plus-Plus
MIT License
29.63k stars 7.04k forks source link

[FEATURE] Competitions solutions #1576

Open KukretiShubham opened 2 years ago

KukretiShubham commented 2 years ago

Detailed description

As we all know CPP is quite popular among the competitive programming coders. And a lot of programming challenges are going on. There are very less places where we get solutions or approach to those questions. We will accept the solution after the competition gets over.

Context

This will help budding coders. We can include only standard platform/competitions solutions like

  1. Codeforces.
  2. Google code jam.
  3. Google HashCode.
  4. Google Kickstart.

This will also encourage community folks to participate and contribute to the solution.

Possible implementation

No response

Additional information

No response

ErrolFernandes commented 2 years ago

happy to help with implementing this!we can also host compititons for these questions and add the best solutions into the solution directory.

pratikgl commented 2 years ago

There are very less places where we get solutions or approach to those questions.

Codeforces, Kickstarts, Facebook hacker cup, ... etc. Most of these contests post editorial after the round is over, and they are pretty decent (prepared by problem setters themselves). Streamers like SecondThread, Errichto, William lin also post detailed video solutions (not for every contest tho). Furthermore, after the completion of a round, all the received source codes are open to everyone.

KukretiShubham commented 2 years ago

There are very less places where we get solutions or approach to those questions.

Codeforces, Kickstarts, Facebook hacker cup, ... etc. Most of these contests post editorial after the round is over, and they are pretty decent (prepared by problem setters themselves). Streamers like SecondThread, Errichto, William lin also post detailed video solutions (not for every contest tho). Furthermore, after the completion of a round, all the received source codes are open to everyone.

I posted this as I couldn't find myself. Can you share links with me. Thanks for letting me know.

pratikgl commented 2 years ago

For example here is the editorial link for Kickstart Round E 2021 Question D (Increasing Sequence Card Games) : Click here

Editorial of Codeforces Round 741 (Div. 2): Click here

Youtube channel SecondThread, William Lin, Errichto

All the submitted solutions are also open to the public and can be accessed in the status section on codeforces. Other platforms have their own ways to access them. eg: my solution for Kickstart 2021 Round E Click here

KukretiShubham commented 2 years ago

Thanks for letting me know. But, standard algorithms are also available everywhere like youtube, blogs etc & but still we are doing it to enhance it. Since we are working to enhance programming and encourage everyone to get into it. I think this works as well.

rivalq commented 2 years ago

@KukretiShubham Do you mean something like portal/website, where users can submit solutions to some specific problems appearing in mentioned contests, and other users can just query for some problem's solution in a certain language? If yes, then if multiple users submit solutions for the same problem should we show all of them or show only some of the top solutions depending on some criterion?.

In my opinion, this is really a nice idea, beginners would definitely find it helpful

KukretiShubham commented 2 years ago

@rivalq my suggestion was not about creating a new portal/website. It was only about submitting the solution for the different contest. With time, folks can optimise and contribute the better solution. For checking the most optimised solution, maintainers or reviewers will have to test and check (I think this is the part we need to think about).

rivalq commented 2 years ago

@KukretiShubham yeah that would also be a good idea. I would love to be part of that. For checking the most optimized solutions, websites like code forces and CodeChef already show stats of each solution. For Google Kickstart and Codejam, we have to manually test them (Google releases the test data, so test data would not be an issue). And Google hashcode is an entirely different type of contest, and I think its solutions are also not public, we may collect some good insights from codeforces's discussion blogs but we still need to think about hashcode. Also, Sometimes Highly optimized codes are not much readable, according to me code should be easily readable.

Generally, I have to look at someone else code, either I look code who is in my friend list or someone who is at the top at standings.

tech-nikks commented 2 years ago

We could try to find similar questions for the algorithms or the methods used to solve the problems for the previous contests. like if a question is solved with a 'x' algorithm we would list the questions which were asked previously on the contests using the same algorithm

P.S:- I'd love to be part of this

pratyaksh1610 commented 2 years ago

We can add problems on a particular topic or an algorithm instead of adding competition solutions, if this could make sense.

sparsh9 commented 2 years ago

The whole dynamic programming is based on 6-7 main questions, other questions are just the derivatives of those problems. So I can include those questions.

KukretiShubham commented 2 years ago

Hey @sparsh9 this is a good idea. Suggest the implementation idea. Shall we create folder within this repo or a complete new repo?

sparsh9 commented 2 years ago

@KukretiShubham This repo seems fine, a new folder will do.

pratham1103 commented 2 years ago

I would like to work on this issue, will you please assign it to me?

mikyoch commented 1 year ago

Is there any min-cost-max-flow implementation in C++? In a graph folder, there is a max-flow implementation but MCMF is not That should be included in the repo, in my opinion

sambhavsaxena commented 1 year ago

@mikyoch do you mean to include the network flow algorithm?

TheCodeVenturer commented 1 year ago

I want contribute to this repository? will you please assign it to me

mishraabhinn commented 1 year ago

I want contribute to this repository? will you please assign it to me

Raise a pr. It will be reviewed by maintainers.

vinay-126 commented 1 year ago

This seems an interesting repository, i would love to work on this one, can you assign this to me..? @KukretiShubham

Yashrajput7232 commented 1 year ago

I aslo do a lot of competative programing on platforms like code chef , also I have give hashcode and code jam the coding contest of Google. And also know various tips and tricks. So I also want to work on this can you assign this to me?

Panquesito7 commented 1 year ago

There's no need for an assignment: create a PR and it will get reviewed by maintainers. :)

789chandan commented 9 months ago

I want to enhance Competitions solutions.