Lucky Numbers in a Matrix Lab

Easy
2
42.1% Acceptance

In this lab, you will be working with a challenge related to lucky numbers in a matrix. You will identify and return all the lucky numbers in a given matrix. A lucky number is an element of the matrix that is the minimum element in its row and maximum in its column. You will have to follow the rules of ESM import/export and create multiple challenges.

Example 1:

const matrix = [ [3, 7, 8], [9, 11, 13], [15, 16, 17], ]; // Output: [15]

Example 2:

const matrix = [ [1, 10, 4, 2], [9, 3, 8, 7], [15, 16, 17, 12], ]; // Output: [12]

Example 3:

const matrix = [ [7, 8], [1, 2], ]; // Output: [7]

Inside the lab, there will be challenges arranged with clear instructions for each. Each challenge will come with an evaluation script that tests your implementation against specific constraints.

Make sure to export any function/variable you are asked to develop in the challenges so that the evaluation script can properly test them. Follow the order of challenges and make sure you complete every part of the given instructions.

Once you have completed all the challenges, your lab will be evaluated automatically, presenting you with your final score. Good luck!