Skip to content

Example "sort sorts better than n^2" doesn't actually verify the algorithm's time complexity #38

@davidrunger

Description

@davidrunger

Someone not familiar with time complexity might see that this spec is passing and assume that their algorithm is less than O(n^2), when in fact the algorithm might be O(n^2) or worse.

I would think it would be better to just call the spec "sort... can sort a large array" or something.

Or, on the other hand, maybe you actually could do something to verify the time complexity, along the lines of what is in the binary-search "uses a divide and conquer algorithm" example, maybe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions