Skip to content

Merge sort best & average case O(n)? #340

Closed

Description

@sfdye

Activity

  1. changed the title [-]Mergesort best & average case O(n)?[/-] on Sep 13, 2018
  2. pandyamarut commented on Sep 13, 2018

    @pandyamarut

    it's O(n log n ) only.

  3. hasangokdag commented on Sep 13, 2018

    @hasangokdag
    Contributor

    #342 I changed the readme and created a pull request

  4. vishkothari96 commented on Sep 18, 2018

    @vishkothari96

    It is O(n*log(n)) for best, average and worst case.
    Where, n:size of the array under consideration.

  5. sumitkumar22299 commented on Sep 19, 2018

    @sumitkumar22299

    Yes! It should be O(n*log(n)) for every case i.e. best case, average case, worst case.

  6. hasangokdag commented on Sep 21, 2018

    @hasangokdag
    Contributor

    Are you pointing out that there should be a "" between n and log(n)?
    like O(n log(n)) vs O(n
    log(n))?

    In readme file Merge, Quick and Shell is also using one space as multiplication instead of "*". Thats why I also used it that way in the PR.

  7. sfdye commented on Sep 22, 2018

    @sfdye
    Author

    @hasangokdag No. In the master, best & average are O(n) which are simply incorrect and misleading.

  8. piyush01123 commented on Sep 22, 2018

    @piyush01123
    Contributor

    Hi @sfdye , @hasangokdag has corrected precisely what you are saying in his commit. Look at his commit: ce3e678
    But his PR is still open, please be patient and let the repo owners merge his PR.

  9. sfdye commented on Sep 22, 2018

    @sfdye
    Author

    @piyush-kgp Yeah I am aware of the PR. It should get high priority as this simple typo could fail someone's interview.

  10. piyush01123 commented on Sep 22, 2018

    @piyush01123
    Contributor

    Yes. you are right. Just noticed that this thread is 9 days old. Apologies.

  11. AnshulMalik commented on Sep 28, 2018

    @AnshulMalik
    Member
  12. sfdye commented on Sep 28, 2018

    @sfdye
    Author

    Finally this is merged. Cheers 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions