Skip to content

Conversation

johar-inderpreet
Copy link

  • FindFirstAndLastPosition in a sorted array with duplicate elements
  • Find Minimum element in a rotated sorted array
  • Find Peak element in the array

- FindFirstAndLastPosition in a sorted array with duplicate elements
- Find Minimum element in a rotated sorted array
- Find Peak element in the array
@super30admin
Copy link
Owner

  • The student's solution is well-implemented and follows best practices. The logic is clear and concise.
  • The inclusion of comments and descriptive variable names enhances readability.
  • The solution handles edge cases effectively, such as when the array is already sorted or contains a single element.
  • One minor improvement could be to ensure consistency in the return statement. The reference solution returns -1 as a fallback, while the student's solution returns arr[low]. While this works in practice, it's good to clarify the fallback behavior in comments.

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