Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Add Java Prpgram to find the Single Non-Duplicate Element in a Sorted Array Using Binary Search #107

Closed
SaurabhKumar171 opened this issue Oct 6, 2024 · 3 comments
Assignees

Comments

@SaurabhKumar171
Copy link
Contributor

Detailed Explanation:
Given a sorted array where every element appears twice except for one element that appears only once, you are tasked with finding the single non-duplicate element. The challenge is to solve this problem in O(log n) time complexity using binary search. This ensures efficiency when working with large datasets.

Steps to Reproduce:
1). Input a sorted array of integers, where each element except one appears exactly twice.
2). The array is sorted, and the single non-duplicate element is present exactly once.
3). Implement the binary search algorithm to find the non-duplicate element without iterating through the entire array.

Expected Behavior:
The program should correctly identify and return the element that appears only once in the array, ensuring an optimized time complexity of O(log n).

Can you please assign me this issue under Hacktoberfest 2024?
#Hacktoberfest2024

Copy link

github-actions bot commented Oct 6, 2024

👋 Thank you for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!

@Ayu-hack Ayu-hack added the Hacktoberfest2024 Participant of hacktoberfest label Oct 6, 2024
@Ayu-hack
Copy link
Owner

Ayu-hack commented Oct 6, 2024

Assigned. More repos are available for pull requests, and they’re part of Hacktoberfest 2024.
Feel free to tag me in your Hacktoberfest certificate or badges LinkedIn post! 😄

👉 Follow my GitHub and connect with me on LinkedIn!
Star these repos to stay updated for next year’s Hacktoberfest!

@SaurabhKumar171
Copy link
Contributor Author

SaurabhKumar171 commented Oct 6, 2024

Screenshot 2024-10-06 at 2 55 36 PM Hey @Ayu-hack , I have submitted a pull request #108 to add a solution for finding a single non-duplicate element using binary search.

Please review it at your convenience. I appreciate your time!

@Ayu-hack Ayu-hack removed the Hacktoberfest2024 Participant of hacktoberfest label Oct 7, 2024
@Ayu-hack Ayu-hack closed this as completed Oct 8, 2024
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

2 participants