Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Conversation

yohannesME
Copy link
Contributor

…g sort is a linear time sorting algorithm that works well when the range of values in the input array is small.

Please fill all the details and checkbox, so we can merge PR faster.

Pull Request Template

What have you Changed(must)

I added the counting sort algorithm in Python, Java, C++ and also I updated the JavaScript implementation of counting sort by making it align with the added implementation in the other programming languages. The new implementation has been commented and written in a clearly understandable way and also, a new example array has been added to the main function to demonstrate the sorting performance of the Counting Sort implementation, also a docstring has been updated to describe the inputs and outputs of the sorting function as well as the time and space complexity. All tests pass successfully, and the new implementation has been tested on a variety of input sizes and ranges of values. This Pull Request completes the changes to the counting sort implementation and is ready for review.

Write here what you have changed in codebase
there was an implementation of counting sort in the codebase with JavaScript, but to make it align with the other implementations I modified the implementation by adding comments and doc string , and by also demonstrating the working of the sorting algorithm with an example.

Issue no.(must) - #932

Self Check(Tick After Making pull Request)

  • This issue was assigned to me if not it will marked as spam.
  • My file is in proper folder
  • I am following clean code and Documentation. My code is well linted and I am using flake8 standard for python
  • I have added title and what program will do first in the file

acknowledgment

  • I have tested the script and distributed it under an MIT license.

README - How to Contribute

…g sort is a linear time sorting algorithm that works well when the range of values in the input array is small. These implementations all follow the same algorithm, but use different syntax and data structures specific to each language. In each implementation, there is a function that takes an array of integers as input and returns a sorted array of integers. Additionally, there is an example array defined and sorted using the counting sort function, with the sorted result printed to the console or standard output. Added a docstring explaining the algorithm's time and space complexities. This commit completes the implementation of counting sort in four different programming languages.
@codeperfectplus codeperfectplus merged commit 560565a into Py-Contributors:master Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants