Cosmos: Specify ascending/descending property for comparison based sorts

Created on 14 Aug 2020  路  4Comments  路  Source: OpenGenus/cosmos

This is a(n):

  • [ ] New algorithm
  • [ ] Update to an existing algorithm
  • [ ] Error
  • [x] Proposal to the Repository

Details:

Comparison based sorting algorithms can have two results: the object is either sorted in ascending or descending order. From what I see, most of the algorithms submitted here assume ascending order, but this can be easily resolved if an additional boolean parameter is passed to the sort function to specify the ascending/descending property. This would also entail changing the test files which depend upon the sort function accepting only the object as a parameter.

Hacktoberfest

Most helpful comment

I would like to work on this @aaditkamat @aashigupta19 . Could you assign me this?

All 4 comments

I would like to work on this @aaditkamat @aashigupta19 . Could you assign me this?

I can do this for C++

I could work on this in C, if no one else is.

@siddhantbarua Sure, you may check recently opened pull requests and get started on it if available or choose a different language 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arthurlacoste picture arthurlacoste  路  3Comments

grantmwilliams picture grantmwilliams  路  4Comments

sebasrp picture sebasrp  路  3Comments

arnavb picture arnavb  路  3Comments

InfiniteCoder picture InfiniteCoder  路  3Comments