Jeevan posted a puzzle. A matrix Nx M containing
integers is given. Isosceles triangles can be composed
from elements in matrix by selecting elements in each
row with formula (2 x row_number - 1). Please note,
any row except last row can be labelled as row / (and
subsequent rows 2, 3 etc.) for purpose of composing
triangle
To make it clear, here is an example. Suppose 3 x 5
matrix contains integers as follows:
5
7
3
5
7
7 isosceles triangles can be formed as explained below.
Explanation:
Count of valid triangles having r rows + (N-r+1)(M-
2r+2), in matrix with N rows, M columns and musiin
Answers
Answered by
5
Answer:
Jeevan posted a puzzle. A matrix Nx M containing
integers is given. Isosceles triangles can be composed
from elements in matrix by selecting elements in each
row with formula (2 x row_number - 1). Please note,
any row except last row can be labelled as row / (and
subsequent rows 2, 3 etc.) for purpose of composing
triangle
To make it clear, here is an example. Suppose 3 x 5
matrix contains integers as follows:
5
7
3
5
7
7 isosceles triangles can be formed as explained below.
Explanation:
Count of valid triangles having r rows + (N-r+1)(M-
2r+2), in matrix with N rows, M columns and musiin
Similar questions