New algorithm suggestion : Dutch National Flag algorithm
Since it is a very popular algorithm, I feel it should be a part of this collection of algorithms and it'll surely be of great help to a lot of programmers.
Already we have function in python which sorts the array data. it is list.sort()
list.sort() is used to sort list with arbitrary range of elements [-inf<a[i]<inf]. Dutch National Flag algorithm is the most optimal sort for 3 unique values (eg. 0,1,2) in an Array. It's a popular algorithm, check https://en.wikipedia.org/wiki/Dutch_national_flag_problem. And isn't the entire point of the repository is to catalogue a list of implementations of popular algorithms in different languages. There's an entire section dedicated to sorting as well.
Dutch National Flag algorithm can sort an array of n size with [0<=a[i]<=2] at guaranteed O(n) complexity in a single pass. It's a common interview problem as well.
@yatharthmathur thanks for responding!
can I pick this issue as my first contribution?
@yatharthmathur is this issue still open ?
There are already 2 pull requests trying to resolve this issue. I suggest you take up a new one or create another.
https://www.geeksforgeeks.org/sort-an-array-of-0s-1s-and-2s/