ShivamSinghal1 / Competitive-Programming-Algorithms

The purpose of this repository is to get all the Algorithms required for Competitive Programming at one place. This will be very helpful. Also one can contribute to this repository and learn something from this.
https://codedigger.tech
21 stars 48 forks source link

Add a Competitive Programming Algorithm. #10

Open ShivamSinghal1 opened 3 years ago

ShivamSinghal1 commented 3 years ago
herobank110 commented 3 years ago

Hello, can I try add merge sort?

ShivamSinghal1 commented 3 years ago

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.

hritik5102 commented 3 years ago

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

I had few query

ShivamSinghal1 commented 3 years ago
  • 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.

rasacharjee commented 3 years ago

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

hritik5102 commented 3 years ago

@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

ShivamSinghal1 commented 3 years ago

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 commented 3 years ago

@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.

hritik5102 commented 3 years ago

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

hritik5102 commented 3 years ago

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

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

Code-Recursion commented 3 years ago

i would like to add few algorithms

hritik5102 commented 3 years ago

@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 :)

ShivamSinghal1 commented 3 years ago

@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 commented 3 years ago

i would like to add few algorithms

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

hritik5102 commented 3 years ago

@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

herobank110 commented 3 years ago

@ShivamSinghal1 Please check out PR #16 merge sort algorithm

hritik5102 commented 3 years ago

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

dhritippaul commented 3 years ago

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

subhadeeppaul commented 3 years ago

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

ShivamSinghal1 commented 3 years ago

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

Already Included

dhritippaul commented 3 years ago

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

ayush523 commented 3 years ago

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.

ShivamSinghal1 commented 3 years ago

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 commented 3 years ago

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

Yes, Fine.

Raksha25 commented 3 years ago

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.

ShivamSinghal1 commented 3 years ago

e my own a

Sorry , That will not work .

Raksha25 commented 3 years ago

e my own a

Sorry , That will not work .

Alright, thanks!

subhadeeppaul commented 3 years ago

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

Thank You

rudrakshi99 commented 3 years ago

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

Rajat947 commented 3 years ago

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

ShivamSinghal1 commented 3 years ago

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

Fine

RashakDude commented 3 years ago

Hey, @ShivamSinghal1 I just added an algorithm for dividing two numbers without using division, multiplication and modulo operation, but just using bit manipulation, which might be useful for interviews. Please review #38

panktishah62 commented 3 years ago

Hey ! HACKTOBERFEST is marked ineligible by Hacktoberfest as it does not align with their core values. I already made a PR there but could be disqualified due to the above reason. Please do not recommend these types of repositories in the community.

Also is https://github.com/ShivamSinghal1/Competitive-Programming-Algorithms/issues/10# this repository valid for contributions by hacktoberfest ?? @ShivamSinghal1

ShivamSinghal1 commented 3 years ago

Hey ! HACKTOBERFEST is marked ineligible by Hacktoberfest as it does not align with their core values. I already made a PR there but could be disqualified due to the above reason. Please do not recommend these types of repositories in the community.

Also is #10 this repository valid for contributions by hacktoberfest ?? @ShivamSinghal1

Sorry for that, I don't think so this repository will be ineligible as i merged the only PR that is good and students learn something from that.

So thats why try to add those algorithm which are unique, coded by you only and others can take help from your written algo.