Skip to content

Updated Pr for BS1 #2326

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

sindhoorpalla
Copy link

No description provided.

@super30admin
Copy link
Owner

  • Matrixd.java:
    • Fix syntax errors: use == for comparison, correct variable names, and remove return statements inside the loop.
    • Ensure the loop condition is l <= r instead of l < r to handle edge cases.
  • SearchRS.java:
    • Initialize l properly (should be int l = 0).
    • Correct nums.length() to nums.length.
    • Move the binarySearch method outside the search method.
    • Fix the logic for finding the pivot in a rotated sorted array.
  • SearchUnknownSizeArray.java:
    • This is the best implementation among the three. Good job!
  • General:
    • Use consistent and descriptive variable names.
    • Ensure proper method structure and avoid nesting methods.
    • Test your code with edge cases to catch logical errors.

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