GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixed a bug in HowManyTimesRotated algorithm by SahilSinghTomar · Pull Request #3544 · TheAlgorithms/Java

Conversation

@SahilSinghTomar

@SahilSinghTomar SahilSinghTomar commented Oct 14, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Describe your change:

  • Add an algorithm?
  • [ Fixed a bug when the value of mid is 0 or equal to length of array. It goes out of bound] Fix a bug or typo in an existing algorithm?
  • Documentation change?

References

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Java files are placed inside an existing directory.
  • All filenames are in all uppercase characters with no spaces or dashes.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
SahilSinghTomar added 2 commits October 14, 2022 21:59
SahilSinghTomar
added searching in a nearly sorted array
30c2c39
SahilSinghTomar
modified no of times sorted array rotated.
cfccc84
@SahilSinghTomar
SahilSinghTomar requested review from siriak and yanglbme as code owners October 14, 2022 16:46
@SahilSinghTomar

SahilSinghTomar commented Oct 14, 2022

Copy link
Copy Markdown
Author

Fixed a bug in HowManyTimesRotated

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SahilSinghTomar added 5 commits October 14, 2022 22:23
@SahilSinghTomar
changed variable name
81c563a
@SahilSinghTomar
Update HowManyTimesRotated.java
b861699
@SahilSinghTomar
removed public static
b583f78
@SahilSinghTomar
Update HowManyTimesRotated.java
9cf98d1
@SahilSinghTomar
Update HowManyTimesRotated.java
68e2ffd
@github-actions

github-actions Bot commented Nov 14, 2022

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale label Nov 14, 2022
siriak
siriak requested changes Nov 14, 2022
View reviewed changes

@siriak siriak left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The code looks good, could you please add some JUnit tests? (see https://github.com/TheAlgorithms/Java/tree/master/src/test/java/com/thealgorithms)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions

github-actions Bot commented Dec 24, 2022

Copy link
Copy Markdown

Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Dec 24, 2022
@Saadanjum0 Saadanjum0 mentioned this pull request Oct 2, 2026
fix: avoid out-of-bounds access in HowManyTimesRotated on small/unrotated arrays #7626
Merged
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@siriak siriak siriak requested changes
@yanglbme yanglbme Awaiting requested review from yanglbme yanglbme is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

stale

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@SahilSinghTomar @siriak
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.