Rotational sort and unknown range#2509
Conversation
Search inside a Rotated Sorted Array (problem2.py)Strengths:
Areas for Improvement:
The solution is solid and correctly solves the problem. It matches the reference solution in both approach and efficiency. VERDICT: PASS Search Inside a Sorted Array whose Length is unknown (problem3.py)Strengths:
Areas for Improvement:
Corrected approach: while low <= high:
mid = low + (high - low) // 2
if reader.get(mid) == target:
return mid
elif reader.get(mid) > target:
high = mid - 1
else:
low = mid + 1
return -1VERDICT: NEEDS_IMPROVEMENT Search a 2D MatrixThe student appears to have submitted solutions for different LeetCode problems rather than the "Search a 2D Matrix" problem. The reference solution demonstrates the correct approach: treating the 2D matrix as a 1D sorted array and using binary search with proper index mapping (row = mid // n, col = mid % n). Key issues:
The student should focus on understanding how to map a 1D binary search index to 2D matrix coordinates. VERDICT: NEEDS_IMPROVEMENT |
No description provided.