Skip to content

Rewrite heapsort with a lambda #1

@alisianoi

Description

@alisianoi

Heapsort first builds a heap and then uses it to sort the list. If you want final order to be non-decreasing, then the heap must be "largest first" and vice versa. So, current API is broken: you must provide an std::greater if you want non-decreasing order when you normally would provide an std::less

Fix it with an on-the-fly lambda?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions