Retired
Search for the Target in 2D Matrix (retired)
11logicale
Description:
Given an integer matrix matrix
, you are tasked to return a tuple containing the row and column indices of the integer target
. If the target
is not in the matrix
, return None
.
The following are the properties of the matrix:
- Each list within the matrix has equal sizes, meaning the matrix is a square or rectangle.
- Each row is sorted in increasing order.
- The first integer of a row is larger than the last integer of the previous row.
Example 1:
Input: matrix = [[1,2,4,5], [6,8,10,12], [13,15,17,20], [21,22,24,26]], target = 10
Output: (1,2)
Example 2:
Input: matrix = [[1,2,4,5], [6,8,10,12], [13,15,17,20], [21,22,24,26]], target = 11
Output: None
Similar Kata:
Stats:
Created | Jan 25, 2025 |
Warriors Trained | 14 |
Total Skips | 0 |
Total Code Submissions | 22 |
Total Times Completed | 11 |
Python Completions | 11 |
Total Stars | 0 |
% of votes with a positive feedback rating | 29% of 7 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 4 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 7 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |