Company: Hitachi_13oct
Difficulty: medium
Array Operations: Prime Region Problem Description You are given a 2D array A of numbers having dimensions N x M . Find the size of the largest region that consists only of prime numbers. Note: A region is formed by a group of one or more numbers. It can be formed by connecting numbers that are horizontally, vertically, or diagonally adjacent. Function Description: In the provided code snippet, implement the primeRegion(int N, int M) method. This method should return the size of the largest region that consists only of prime numbers. You can write your code in the space below the phrase "WRITE YOUR LOGIC HERE". There will be multiple test cases running so the input and Output should match exactly as provided. The base output variable result is set to a default value of -404 which can be modified. Additionally, you can add or remove these output variables. Input Format The first line contains 2 space-separated numbers, denoting the dimensions N and M of the 2D array. Each of the followi