Question: language:pyton Help me soon please Longest sequence Given a matrix Mot dimension MXN design an algorithm and write the Python code to generate a sequences

language:pyton
Help me soon please  language:pyton Help me soon please Longest sequence Given a matrix Mot
dimension MXN design an algorithm and write the Python code to generate

Longest sequence Given a matrix Mot dimension MXN design an algorithm and write the Python code to generate a sequences where M, Bach that: Thero exist on-1) potitions ....) in M1 Entries in positions...)) of Mare same For example, 4 X 4 matrix is given as below: 7 90 271 9208 3371 Elements of the matrix occur in the following positions t occurs in the positions: 10, 1), (1,31.13,3) 2 occurs in the positions: (2.1), (1, 0) 3 occurs in the position: (3.0) 7 occurs in the positions:(0.01.11 (32) occurs in the positions (2.11. (10) 3 occurs in the position: (0 7 occurs in the positions (0,0). 11. (3,2) Boccurs in the position: (0,313, 1.61.21.2,3) 9 occurs in the positions 12.2.2. OX (0, 2) The longest possible sequence is tor element and it is 0.3-1-2 Wren more than ont element has a longest sequence, print at elements and their longest sequence, sorted by the clement. When an element has more than one longest sequence, sort the sequencel and consider only the first and discard the rest Input Format Number of rows of the matrix Number of columns of the matrix Elements of row Elements of row2 Output Format Element with longest soquence in matrix and the longest sequence separated by a tab. When there are more than one element with longest sequence, print in sorted order by element

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!