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

Time Complexity: Update the worst-case scenario example #28915

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

Maddily
Copy link
Contributor

@Maddily Maddily commented Oct 4, 2024

Because

The previous explanation overlooked the worst-case scenario when the element we're looking for is the last one in the array.

This PR

  • Updates the worst-case explanation to make sure it covers both possible cases: when the item isn't found and when the item is the last one in the array.

Issue

Closes #28903

Additional Information

N/A

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added Content: JavaScript Involves the JavaScript course Content: Ruby Involves the Ruby course labels Oct 4, 2024
Copy link
Contributor

@JoshDevHub JoshDevHub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing.

@JoshDevHub JoshDevHub merged commit 4f06250 into TheOdinProject:main Oct 4, 2024
3 checks passed
@Maddily Maddily deleted the worst-case-scenario branch October 4, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: JavaScript Involves the JavaScript course Content: Ruby Involves the Ruby course
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JavaScript: Clarify the worst-case scenario example in Big Ω (Omega notation) section
2 participants