Completed Leetcode 240, 80 and 88 - #1798
Conversation
Merge Sorted Array (Problem 1- Leetcode80.py)It appears that you've submitted a solution for a different problem (Remove Duplicates from Sorted Array II) instead of the Merge Sorted Array problem. To correctly solve the Merge Sorted Array problem, you need to:
A common approach is to use three pointers starting from the end of the arrays:
Compare elements from the end and place the larger one at the end of Please resubmit with the correct solution for the Merge Sorted Array problem. VERDICT: NEEDS_IMPROVEMENT Search a 2D Matrix II (Problem 2- Leetcode88.py)It appears that you have submitted a solution for a different problem (LeetCode 88 - Merge Sorted Array) instead of the requested problem (LeetCode 240 - Search a 2D Matrix II). For the "Search a 2D Matrix II" problem, you need to:
A common approach is to start from the top-right corner (or bottom-left corner) and use the sorted properties to eliminate either a row or column at each step, achieving O(m+n) time complexity. Alternatively, you could perform binary search on each row, achieving O(m log n) time complexity as shown in the reference solution. Please re-submit your solution for the correct problem. VERDICT: NEEDS_IMPROVEMENT Remove Duplicates from Sorted Array II (Problem 3- Leetcode240.py)It appears that you've submitted a solution for a different problem. The assigned problem was "Remove Duplicates from Sorted Array II" (LeetCode 80), but your solution is for "Search a 2D Matrix II" (LeetCode 240). To solve the actual problem, you need to:
A common approach is to use a two-pointer technique:
Please resubmit with the correct solution for "Remove Duplicates from Sorted Array II". VERDICT: NEEDS_IMPROVEMENT |
No description provided.