Skip to content

completed binarysearh2 #2201

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

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

Conversation

DhanyasriG
Copy link

No description provided.

@super30admin
Copy link
Owner

Strengths:

  • The solutions correctly implement binary search logic for all three problems.
  • The time and space complexity are optimal.
  • The code is generally clean and follows good practices.

Areas for Improvement:

  • Improve variable naming for better readability (e.g., f in binarySearch could be findFirst).
  • Consider combining the first and last search logic in Problem1 into a single function to reduce redundancy.
  • Add comments to explain the logic, especially the use of boolean flags in binarySearch.
  • Ensure consistent formatting (e.g., spacing around operators and braces).

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.

2 participants