Computer Science, asked by 12345678joho, 3 months ago

Longest sequence
Given a matrix M1 of dimension M X N, design an algorithm and write the Python code to generate a sequence 'S, i- i -..-in, where is, i2, n-1 <=M, in<=N, such that:
There exist (n-1) positions (11.12). (2,3), (03. is) .... (in 1. in) in M1
ii) Entries in positions (11.12). (iz is). (3. is). (in 1. in) of M are same
For example, if a 4 X 4 matrix is given as below:
7 1 98
27 B 1
9 2 9 8
3 8 7 1
Elements of the matrix occur in the following positions :
1 occurs in the positions: (0, 1), (1, 3), (3, 3)
2 occurs in the positions: (2, 1), (1.0)

Answers

Answered by kulwinderkaur8222
0

Answer:

Hlo! hope you are fine. Have agreat day.

Similar questions