add binary-search-1 solutions#2499
Conversation
Search inside a Rotated Sorted Array (solution1.py)The binary search implementation for the 2D matrix problem is well-structured and follows best practices. However, you submitted code for the wrong problem. The "Search in Rotated Sorted Array" problem requires handling a single rotated array where you need to determine which half is sorted at each step and adjust your search accordingly. Your current solution treats the input as a 2D matrix and flattens it for binary search, which is a different algorithm entirely. Please implement the solution for the rotated sorted array problem using the standard approach: at each step, determine whether the left or right half is sorted, then check which half the target could be in based on the sorted half's bounds. VERDICT: NEEDS_IMPROVEMENT Search Inside a Sorted Array whose Length is unknown (solution2.py)The student appears to have implemented a solution for a different problem (search in rotated sorted array). To improve:
STRENGTHS:
NEEDS_IMPROVEMENT:
VERDICT: NEEDS_IMPROVEMENT Search a 2D Matrix (solution3.py)Strengths:
Areas for Improvement:
Note: If this is actually a different LeetCode problem (like "Search in a Sorted Array of Unknown Length" - LeetCode 702), then the solution is correct. However, based on the provided problem statement about a 2D matrix, this solution doesn't match the requirements. VERDICT: NEEDS_IMPROVEMENT |
No description provided.