Skip to content

Done Binary search-1#2457

Open
sainathek1999 wants to merge 1 commit intosuper30admin:masterfrom
sainathek1999:master
Open

Done Binary search-1#2457
sainathek1999 wants to merge 1 commit intosuper30admin:masterfrom
sainathek1999:master

Conversation

@sainathek1999
Copy link
Copy Markdown

No description provided.

@super30admin
Copy link
Copy Markdown
Owner

Strengths:

  • The student demonstrates a strong understanding of binary search and its variations.
  • Code is clean, well-commented, and follows best practices.
  • Correctly handles edge cases and different problem scenarios.

Areas for Improvement:

  • For problem1.java, the time complexity comment could be more precise as O(log(m*n)) is equivalent to O(log N) where N is total elements, but it's not incorrect.
  • In problem3.java, the comment "Need to first expand search window then do normal binary search" could be expanded to explain why this approach is efficient (doubling the high index gives logarithmic time complexity for finding the range).

@super30admin
Copy link
Copy Markdown
Owner

  • Strengths:
    • The student demonstrates a strong understanding of binary search and its variations.
    • The code is clean, well-commented, and follows best practices.
    • The student correctly identifies and handles edge cases, such as rotated arrays and infinite arrays.
  • Areas for Improvement:
    • In Problem1.java, the comment "Just used 1D binary search by mapping index to row/col" could be expanded to explain why this approach works (i.e., because the matrix is sorted row-wise and the first element of each row is greater than the last element of the previous row).
    • In Problem2.java, the comment "Need to carefully check which side is sorted" could be elaborated to explain why this check is necessary (i.e., to determine which half of the array can be safely discarded).
    • In Problem3.java, the comment "Need to first expand search window then do normal binary search" could be clarified to explain why exponential expansion is efficient (i.e., it quickly bounds the target value).

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