René's URL Explorer Experiment


Title: [FEATURE REQUEST] Add Search in Rotated Sorted Array implementation with JUnit tests · Issue #7579 · TheAlgorithms/Java · GitHub

Open Graph Title: [FEATURE REQUEST] Add Search in Rotated Sorted Array implementation with JUnit tests · Issue #7579 · TheAlgorithms/Java

X Title: [FEATURE REQUEST] Add Search in Rotated Sorted Array implementation with JUnit tests · Issue #7579 · TheAlgorithms/Java

Description: What would you like to Propose? Feature Description I would like to propose adding an implementation of Search in Rotated Sorted Array in Java using the Binary Search technique. This is a classic variation of Binary Search that achieves ...

Open Graph Description: What would you like to Propose? Feature Description I would like to propose adding an implementation of Search in Rotated Sorted Array in Java using the Binary Search technique. This is a classic v...

X Description: What would you like to Propose? Feature Description I would like to propose adding an implementation of Search in Rotated Sorted Array in Java using the Binary Search technique. This is a classic v...

Opengraph URL: https://github.com/TheAlgorithms/Java/issues/7579

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE REQUEST] Add Search in Rotated Sorted Array implementation with JUnit tests","articleBody":"### What would you like to Propose?\n\n### Feature Description\nI would like to propose adding an implementation of **Search in Rotated Sorted Array** in Java using the Binary Search technique. \n\nThis is a classic variation of Binary Search that achieves $\\mathcal{O}(\\log N)$ time complexity by checking which half of the rotated array is sorted at each step.\n\n### Proposed Changes\nI would like to add:\n1. `SearchInRotatedArray.java` under `src/main/java/com/thealgorithms/searches/`\n   - Complete implementation with clear Javadoc explanations ($\\mathcal{O}(\\log N)$ Time, $\\mathcal{O}(1)$ Space).\n   - Proper null checks and edge-case handling.\n2. `SearchInRotatedArrayTest.java` under `src/test/java/com/thealgorithms/searches/`\n   - Comprehensive JUnit 5 test suite covering standard rotations, target not found, empty arrays, and single-element arrays.\n\n### Verification\nI will ensure all code follows the project's formatting rules and passes `./gradlew test` / `mvn test` locally before opening a PR.\n\n---\n*I would love to implement this as my first open-source contribution! Could a maintainer please assign this issue to me?*\n\n### Issue details\n\n### Issue Details & Algorithm Overview\n\n#### 1. Algorithm Description\n- **Algorithm:** Search in Rotated Sorted Array\n- **Category:** Searching Algorithms / Binary Search Variation\n- **Language:** Java\n\n#### 2. How the Algorithm Works\nGiven a sorted array of integers that has been rotated at an unknown pivot index (e.g., `[0, 1, 2, 4, 5, 6, 7]` becomes `[4, 5, 6, 7, 0, 1, 2]`), find the index of a given target element. If the element is not present, return `-1`.\n\nKey Logic:\n1. Find the middle element using `int mid = left + (right - left) / 2;` to avoid integer overflow.\n2. Check if the left half of the array (`nums[left]` to `nums[mid]`) is sorted:\n   - If sorted, check if the target falls within `nums[left]` and `nums[mid]`. Adjust `left` or `right` boundaries accordingly.\n3. Otherwise, the right half must be sorted:\n   - Check if the target falls within `nums[mid]` and `nums[right]`. Adjust boundaries accordingly.\n\n#### 3. Complexity Analysis\n- **Time Complexity:** $\\mathcal{O}(\\log N)$ — Divides the search space in half at each iteration.\n- **Space Complexity:** $\\mathcal{O}(1)$ — Uses constant iterative space without recursion stacks or extra memory allocation.\n\n#### 4. Planned Files & Folder Structure\n- `src/main/java/com/thealgorithms/searches/SearchInRotatedArray.java` (Implementation)\n- `src/test/java/com/thealgorithms/searches/SearchInRotatedArrayTest.java` (JUnit 5 Test Suite)\n\n### Additional Information\n\n_No response_","author":{"url":"https://github.com/Dhanshri07-tech","@type":"Person","name":"Dhanshri07-tech"},"datePublished":"2026-08-23T16:57:13Z","url":"https://github.com/TheAlgorithms/Java/issues/7579"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:de2a731d-198c-8529-49b1-f2d141ff77c8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8CEE:1EC9BC:30B6EAC:3E23F49:6B01D2EE
html-safe-nonce520a99c2f0fc480512d80245c9d3abdc29830cbe9327bb3e3da86106bc170da7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0VFOjFFQzlCQzozMEI2RUFDOjNFMjNGNDk6NkIwMUQyRUUiLCJ2aXNpdG9yX2lkIjoiNTcwNzk1NzI0NTQ5NzY5MjkxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8c5d2a2fe58cded7c6aaac1cf5fd27759fc044689167a97a720151d5ca759733
hovercard-subject-tagissue:5228008976
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TheAlgorithms/Java/7579/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2d71c38e93fa1c7d2d6b56f9d054ea81f6df13e36b7638bcdf016a9981b26366/TheAlgorithms/Java/issues/7579
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2d71c38e93fa1c7d2d6b56f9d054ea81f6df13e36b7638bcdf016a9981b26366/TheAlgorithms/Java/issues/7579
og:image:altWhat would you like to Propose? Feature Description I would like to propose adding an implementation of Search in Rotated Sorted Array in Java using the Binary Search technique. This is a classic v...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDhanshri07-tech
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/TheAlgorithms/Java git https://github.com/TheAlgorithms/Java.git
octolytics-dimension-user_id20487725
octolytics-dimension-user_loginTheAlgorithms
octolytics-dimension-repository_id63477660
octolytics-dimension-repository_nwoTheAlgorithms/Java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id63477660
octolytics-dimension-repository_network_root_nwoTheAlgorithms/Java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/TheAlgorithms/Java/issues/7579#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTheAlgorithms%2FJava%2Fissues%2F7579
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTheAlgorithms%2FJava%2Fissues%2F7579
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=TheAlgorithms%2FJava
Reloadhttps://github.com/TheAlgorithms/Java/issues/7579
Reloadhttps://github.com/TheAlgorithms/Java/issues/7579
Reloadhttps://github.com/TheAlgorithms/Java/issues/7579
TheAlgorithmshttps://github.com/TheAlgorithms
Javahttps://github.com/TheAlgorithms/Java
Codehttps://github.com/TheAlgorithms/Java
Issues5 (5)https://github.com/TheAlgorithms/Java/issues
Pull requests19 (19)https://github.com/TheAlgorithms/Java/pulls
Actionshttps://github.com/TheAlgorithms/Java/actions
Security and qualityhttps://github.com/TheAlgorithms/Java/security
Insightshttps://github.com/TheAlgorithms/Java/insights
https://github.com/TheAlgorithms/Java
New issuehttps://github.com/login?return_to=https://github.com/TheAlgorithms/Java/issues/7579
New issuehttps://github.com/login?return_to=https://github.com/TheAlgorithms/Java/issues/7579
[FEATURE REQUEST] Add Search in Rotated Sorted Array implementation with JUnit testshttps://github.com/TheAlgorithms/Java/issues/7579#top
https://github.com/Pratik5545
https://github.com/runtimecraft-105
enhancementhttps://github.com/TheAlgorithms/Java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/Dhanshri07-tech
Dhanshri07-techhttps://github.com/Dhanshri07-tech
on Aug 23, 2026https://github.com/TheAlgorithms/Java/issues/7579#issue-5228008976
Dhanshri07-techhttps://github.com/Dhanshri07-tech
enhancementhttps://github.com/TheAlgorithms/Java/issues?q=state%3Aopen%20label%3A%22enhancement%22
on Aug 23, 2026https://github.com/TheAlgorithms/Java/issues/7579#event-29876453043
https://github.com/Vivek-ML001
Vivek-ML001https://github.com/Vivek-ML001
on Aug 26, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-5421092790
https://github.com/Rosander0
Rosander0https://github.com/Rosander0
on Aug 27, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-5441536350
@sohamcodes-ctrlhttps://github.com/sohamcodes-ctrl
@DenizAltunkapanhttps://github.com/DenizAltunkapan
@alxkmhttps://github.com/alxkm
@yanglbmehttps://github.com/yanglbme
https://github.com/sohamcodes-ctrl
sohamcodes-ctrlhttps://github.com/sohamcodes-ctrl
on Aug 27, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-5442122867
@DenizAltunkapanhttps://github.com/DenizAltunkapan
DenizAltunkapanhttps://github.com/DenizAltunkapan
sohamcodes-ctrlhttps://github.com/sohamcodes-ctrl
Vivek-ML001https://github.com/Vivek-ML001
on Aug 27, 2026https://github.com/TheAlgorithms/Java/issues/7579#event-30131467048
https://github.com/sohamcodes-ctrl
sohamcodes-ctrlhttps://github.com/sohamcodes-ctrl
on Aug 28, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-5450132303
@Vivek-ML001https://github.com/Vivek-ML001
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Sep 28, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-5861428772
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
stalehttps://github.com/TheAlgorithms/Java/issues?q=state%3Aopen%20label%3A%22stale%22
on Sep 28, 2026https://github.com/TheAlgorithms/Java/issues/7579#event-31954885492
https://github.com/Vivek-ML001
Vivek-ML001https://github.com/Vivek-ML001
on Sep 28, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-5868391948
@sohamcodes-ctrlhttps://github.com/sohamcodes-ctrl
@DenizAltunkapanhttps://github.com/DenizAltunkapan
https://github.com/DenizAltunkapan
DenizAltunkapanhttps://github.com/DenizAltunkapan
on Sep 28, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-5876406481
@Vivek-ML001https://github.com/Vivek-ML001
github-actionshttps://github.com/apps/github-actions
stalehttps://github.com/TheAlgorithms/Java/issues?q=state%3Aopen%20label%3A%22stale%22
on Sep 29, 2026https://github.com/TheAlgorithms/Java/issues/7579#event-32040129354
https://github.com/runtimecraft-105
runtimecraft-105https://github.com/runtimecraft-105
on Oct 25, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-6400909764
@DenizAltunkapanhttps://github.com/DenizAltunkapan
@alxkmhttps://github.com/alxkm
@yanglbmehttps://github.com/yanglbme
DenizAltunkapanhttps://github.com/DenizAltunkapan
runtimecraft-105https://github.com/runtimecraft-105
Vivek-ML001https://github.com/Vivek-ML001
sohamcodes-ctrlhttps://github.com/sohamcodes-ctrl
on Oct 25, 2026https://github.com/TheAlgorithms/Java/issues/7579#event-34196572360
https://github.com/DenizAltunkapan
DenizAltunkapanhttps://github.com/DenizAltunkapan
on Oct 25, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-6401371621
@runtimecraft-105https://github.com/runtimecraft-105
https://github.com/Pratik5545
Pratik5545https://github.com/Pratik5545
on Nov 2, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-6571464167
@sohamcodes-ctrlhttps://github.com/sohamcodes-ctrl
@Vivek-ML001https://github.com/Vivek-ML001
@DenizAltunkapanhttps://github.com/DenizAltunkapan
https://github.com/DenizAltunkapan
DenizAltunkapanhttps://github.com/DenizAltunkapan
on Nov 3, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-6612050156
@Pratik5545https://github.com/Pratik5545
DenizAltunkapanhttps://github.com/DenizAltunkapan
Pratik5545https://github.com/Pratik5545
on Nov 3, 2026https://github.com/TheAlgorithms/Java/issues/7579#event-35051559207
https://github.com/Pratik5545
Pratik5545https://github.com/Pratik5545
on Nov 9, 2026https://github.com/TheAlgorithms/Java/issues/7579#issuecomment-6741966654
#7623https://github.com/TheAlgorithms/Java/pull/7623
#7579https://github.com/TheAlgorithms/Java/issues/7579
Sign up for freehttps://github.com/signup?return_to=https://github.com/TheAlgorithms/Java/issues/7579
Sign in to commenthttps://github.com/login?return_to=https://github.com/TheAlgorithms/Java/issues/7579
Pratik5545https://github.com/Pratik5545
runtimecraft-105https://github.com/runtimecraft-105
enhancementhttps://github.com/TheAlgorithms/Java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.