Skip to content

Conversation

JoshnaRavi04
Copy link

No description provided.

@super30admin
Copy link
Owner

  • For the rotated sorted array problem, the logic for adjusting low and high is incorrect. The conditions should check if the left or right half is sorted and then determine if the target lies within that sorted half. The current implementation does not correctly handle these cases, leading to incorrect search results.
  • The 2D matrix solution is well-implemented and correctly solves the problem. The use of integer division and modulus to map the 1D index to 2D coordinates is a good approach.
  • Consider adding more comments to explain the logic, especially for the rotated sorted array problem, to make it clearer why certain conditions are used.

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