Lucky Numbers in Matrix Problem

Lucky Numbers in Matrix Problem — ExecCode Easy DSA Practice

Solve the Lucky Numbers in Matrix problem on ExecCode. Free online easy DSA practice in Matrix. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given the input needed to solve Lucky Numbers in Matrix. Your task is to compute the required answer and return JSON array of lucky numbers. A rectangular board contains information in rows and columns. In Lucky Numbers in Matrix, each cell must be interpreted with its neighbors or position in mind. m n, then m rows of n integers.

Examples

Input {"matrix": [[7]]}; Output [7]. Input {"matrix": [[1, 2], [3, 4]]}; Output [3]. Input {"matrix": [[3, 7, 8], [9, 11, 13], [15, 16, 17]]}; Output [15]

Constraints

Distinct matrix entries

Practice Lucky Numbers in Matrix free on ExecCode. Browse DSA problems, topic map, and placement guides.