Question: F . Validating Coordinates in a Matrix validate coordinates ( matrix: list [ list [ int ] ] , row _ idx: int, col _
F Validating Coordinates in a Matrix validate coordinatesmatrix: listlistint rowidx: int, colidx: int, series: listint bool Given a matrix of size a series of numbers, and the indices represent a row and column inside the matrix, return True if and only if the specified series of numbers can be found at and overlap the given indices inside the matrix either via row, column, or diagonal. The numbers must match in the exact order provided but can also be matched in reverse order. If no matches are found, return False. Hint: You may find it incredibly helpful to plan this function out in advance. Similar to the end goal here is still the same we want to search for a list in a group of lists. The number of lists in this question is constant one for each direction How many lists do you always have to build? What are the constraints of the list? How far away do we really have to search from a coordinate? It may be helpful to think of the question in terms of a single dimension first. What if the question was rephrased to being given a List L Index I, and Series S
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
