Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(insertion-sort): ♻️ no need to check on j <= 0, undefined is never > truthy #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AndrewLawendy
Copy link

@AndrewLawendy AndrewLawendy commented Jul 23, 2022

It's an extra operation
nums[-1] (undefined) will never be bigger than any truthy value

@AndrewLawendy AndrewLawendy changed the title refactor(insertion-sort): ♻️ no need to check on j <= 0any trythy >= undefined anyway refactor(insertion-sort): ♻️ no need to check on j <= 0 truthy >= undefined anyway Jul 23, 2022
@AndrewLawendy AndrewLawendy changed the title refactor(insertion-sort): ♻️ no need to check on j <= 0 truthy >= undefined anyway refactor(insertion-sort): ♻️ no need to check on j <= 0, undefined is never > truthy Jul 23, 2022
@AndrewLawendy AndrewLawendy force-pushed the patch-insertion-sort branch from 6aa7668 to e33bda6 Compare July 23, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant