Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Array.sort() time complexity #83

Closed
fedemengo opened this issue Jun 8, 2018 · 6 comments
Closed

Array.sort() time complexity #83

fedemengo opened this issue Jun 8, 2018 · 6 comments

Comments

@fedemengo
Copy link
Contributor

fedemengo commented Jun 8, 2018

Shouldn't the time complexity of Array.sort() be O(NlogN) instead of O(logN)? In questions/big-o-notation.md

@fejes713
Copy link
Collaborator

fejes713 commented Jun 8, 2018

Yeah, I think you're right as well. My friend told me the same thing. Feel free to submit PR if you would like to 👍

Thanks for noticing this 👍

@fejes713 fejes713 closed this as completed Jun 8, 2018
@skatcat31
Copy link
Contributor

IF this hasn't been fixed yet it shouldn't be closed. Either we close it with a fix, they close it with a fix, or we put it as 'will not fix'. Otherwise it should stay open since it has not been closed(fixed or decided on) just yet

@skatcat31 skatcat31 reopened this Jun 8, 2018
@fejes713
Copy link
Collaborator

fejes713 commented Jun 8, 2018

@skatcat31 You're right. Thanks for letting me know! 👍

fedemengo added a commit to fedemengo/30-seconds-of-interviews that referenced this issue Jun 8, 2018
fedemengo added a commit to fedemengo/30-seconds-of-interviews that referenced this issue Jun 8, 2018
@fedemengo
Copy link
Contributor Author

@skatcat31 In my local commit there are two more fixes you can integrate into your last fix. See if it's fine for you.

@skatcat31 skatcat31 reopened this Jun 8, 2018
@atomiks
Copy link
Contributor

atomiks commented Jun 8, 2018

NlogN is 3000ms, no?

@skatcat31
Copy link
Contributor

... I wish I had seen that before I tried to remember what base the notation was in... this really has been a long week.

flxwu pushed a commit that referenced this issue Jun 7, 2019
flxwu pushed a commit that referenced this issue Jun 7, 2019
Fix #83 Big O Notation: missed the time taken and the NlogN math
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants