Add search algorithms for rotated array, 2D matrix, and unknown size …#2467
Add search algorithms for rotated array, 2D matrix, and unknown size …#2467Balaviknesh wants to merge 1 commit intosuper30admin:masterfrom
Conversation
|
Strengths:
Areas for Improvement:
One minor point: the problem states that the array has distinct values, so we don't have to worry about duplicates. The solution leverages this. Overall, the solution is excellent. |
|
Your solution for the rotated sorted array search is excellent. It correctly identifies which half of the array is sorted and adjusts the search range accordingly. The time and space complexity are optimal. The code is clean and well-commented. However, please note that when submitting solutions, you should only include the relevant code for the problem at hand. Including unrelated problems (like Search2DMatrix and SearchArrayUnknownSize) in the same file or submission might cause confusion. For future submissions, focus on the specific problem being evaluated. |
…array