Competitive-Programming-Algorithms icon indicating copy to clipboard operation
Competitive-Programming-Algorithms copied to clipboard

Add a Competitive Programming Algorithm.

Open ShivamSinghal1 opened this issue 5 years ago • 34 comments

  • Add a Competitive Programming Algorithm other than the mentioned in the repository.
  • Please do not copy from the internet and paste it here.
  • Please try to implement on your own.
  • Try to add generalize and widely used algorithm such as graph_algo - Dijkstra , MSP . Trie Algorithm.
  • You will surely going to learn something from that.
  • Update ReadMe File too.

ShivamSinghal1 avatar Sep 25 '20 07:09 ShivamSinghal1

Hello, can I try add merge sort?

herobank110 avatar Sep 25 '20 07:09 herobank110

Hello, can I try add merge sort?

Yes you can , add this in Sorting Folder, also implement it on your own, not just copy-paste.

ShivamSinghal1 avatar Sep 25 '20 07:09 ShivamSinghal1

Hello @ShivamSinghal1 , I would like to contribute to this issue :)

I had few query

  • Should i create a seperate folder or just add the file ?
  • is CPP is mandatory language to use ?
  • Should I also update the ReadMe ?

hritik5102 avatar Sep 25 '20 08:09 hritik5102

  • add the file

Hi , If possible try to add it in separate folder, best possible folder. No CPP is not mandatory but recommended. Update the ReadMe too.

The main purpose that we can learn something from this. Hope this help and Thanks for your contribution.

ShivamSinghal1 avatar Sep 25 '20 08:09 ShivamSinghal1

Hello @ShivamSinghal1 can I add the Level Order Traversal of a tree

rasacharjee avatar Sep 25 '20 08:09 rasacharjee

@ShivamSinghal1 Yep sure :) , I'm adding all sorting algorithm in the sorting folder with ReadMe of all algorithm

can you please create a seperate issue related to documentation so that i can make PR thier , so that chance of ambiguity will be less

Thank you

hritik5102 avatar Sep 25 '20 08:09 hritik5102

Hello @ShivamSinghal1 can I add the Level Order Traversal of a tree

No Please , if we see the generalized version of Level Order Traversal. it will be BFS. and BFS is already implemented. Also The main purpose is to include the competitive Programming Algorithm.

Thanks

ShivamSinghal1 avatar Sep 25 '20 08:09 ShivamSinghal1

@ShivamSinghal1 Yep sure :) , I'm adding all sorting algorithm in the sorting folder with ReadMe of all algorithm

can you please create a seperate issue related to documentation so that i can make PR thier , so that chance of ambiguity will be less

Thank you

Okay , But be sure to implement these on your own.

ShivamSinghal1 avatar Sep 25 '20 08:09 ShivamSinghal1

Yes i have already done that ... during my placements so all of code is well return and with documentation

hritik5102 avatar Sep 25 '20 08:09 hritik5102

@ShivamSinghal1 Check out PR #12 ... Done with neccasary changes :)

If any furthur changes are required please let me know .. Thank you

hritik5102 avatar Sep 25 '20 08:09 hritik5102

i would like to add few algorithms

Code-Recursion avatar Sep 25 '20 11:09 Code-Recursion

@ShivamSinghal1 Check out PR #12 ... Done with necessary changes :)

If any further changes are required please let me know .. Thank you

Can you please review the code

Thank you :)

hritik5102 avatar Sep 25 '20 14:09 hritik5102

@ShivamSinghal1 Check out PR #12 ... Done with necessary changes :) If any further changes are required please let me know .. Thank you

Can you please review the code

Thank you :)

I found all your algorithms copied from https://github.com/jainaman224/Algo_Ds_Notes/blob/master/Bubble_Sort/Bubble_Sort.cpp here.

My main motive that we learn something from it by implementing the algorithms. Please avoid this. This time i am closing your PR for this reason. Please avoid this next time.

Implement only one algorithms, it will not be a problem or but not copy paste.

ShivamSinghal1 avatar Sep 26 '20 04:09 ShivamSinghal1

i would like to add few algorithms

Sure, please avoid copy-paste , implement on your own. Thanks

ShivamSinghal1 avatar Sep 26 '20 04:09 ShivamSinghal1

@ShivamSinghal1 Check out PR #12 ... Done with necessary changes :) If any further changes are required please let me know .. Thank you

Can you please review the code Thank you :)

I found all your algorithms copied from https://github.com/jainaman224/Algo_Ds_Notes/blob/master/Bubble_Sort/Bubble_Sort.cpp here.

My main motive that we learn something from it by implementing the algorithms. Please avoid this. This time i am closing your PR for this reason. Please avoid this next time.

Implement only one algorithm, it will not be a problem or but not copy-paste.

Ok , yeah fair enough , i'll add my own code but it's not documented ... and another thing its return in C language , it's works right ?

( Sorry as i'm one of the contributor of the repo (Algo_DS_Notes) so i thought i should refer from that repo , but yeah you are right , the main purpose of the open source contribution is to learn something .. but if we don't follow the purpose then our contribution doesn't matter )

Thank you

hritik5102 avatar Sep 26 '20 07:09 hritik5102

@ShivamSinghal1 Please check out PR #16 merge sort algorithm

herobank110 avatar Sep 26 '20 11:09 herobank110

@ShivamSinghal1 now you can check I update my commit in the same PR #12

hritik5102 avatar Sep 27 '20 06:09 hritik5102

Hello @ShivamSinghal1 , I would like to add Binary Exponential code {O(log n) approach}.

dhritippaul avatar Sep 29 '20 18:09 dhritippaul

Hello @ShivamSinghal1, I will be happy if I can add Euclidean algorithm GCD.

subhadeeppaul avatar Sep 29 '20 18:09 subhadeeppaul

Hello @ShivamSinghal1 , I would like to add Binary Exponential code {O(log n) approach}.

Already Included

ShivamSinghal1 avatar Sep 30 '20 04:09 ShivamSinghal1

Hello @ShivamSinghal1 , I would like to add SPIRAL SEARCH IN A 2d array (C++ program). Shall I add it ?

dhritippaul avatar Sep 30 '20 05:09 dhritippaul

Hi @ShivamSinghal1 - I would like to add an algorithm to count set bits in an integer . The name of the algorithm is Brian Kernighan Algorithm.

ayush523 avatar Sep 30 '20 06:09 ayush523

Hi @ShivamSinghal1 - I would like to add an algorithm to count set bits in an integer . The name of the algorithm is Brian Kernighan Algorithm.

Fine.

ShivamSinghal1 avatar Sep 30 '20 08:09 ShivamSinghal1

Hello @ShivamSinghal1 , I would like to add SPIRAL SEARCH IN A 2d array (C++ program). Shall I add it ?

Yes, Fine.

ShivamSinghal1 avatar Sep 30 '20 08:09 ShivamSinghal1

Hi, @ShivamSinghal1 I would like to add a few solutions to competitive problems like moving zeroes to end in O(n) and constant space, to find non-decreasing array and similar to these. These algorithms are my own and not copied from anywhere although I have submitted it on leetcode to pass test cases but not on any other repo.

Raksha25 avatar Sep 30 '20 08:09 Raksha25

e my own a

Sorry , That will not work .

ShivamSinghal1 avatar Sep 30 '20 08:09 ShivamSinghal1

e my own a

Sorry , That will not work .

Alright, thanks!

Raksha25 avatar Sep 30 '20 09:09 Raksha25

I have included my CPP file in Maths section. Can you please review the code?

Thank You

subhadeeppaul avatar Sep 30 '20 10:09 subhadeeppaul

Hi @ShivamSinghal1, I would like to add Dijkstra Algorithm in C++.

rudrakshi99 avatar Sep 30 '20 17:09 rudrakshi99

HI @ShivamSinghal1, can I add quick sort with 3 partition?

Rajat947 avatar Sep 30 '20 18:09 Rajat947