Method
seen
(int arr[],int element,int end)
Source from the content-addressed store, hash-verified
| 62 | } |
| 63 | // function to check if there is any duplicate elements in the firstRow |
| 64 | public static boolean seen(int arr[],int element,int end) |
| 65 | { |
| 66 | for(int i=0;i<end;i++) |
| 67 | { |
| 68 | if(element==arr[i]) return true; |
| 69 | } |
| 70 | return false; |
| 71 | } |
| 72 | public static void commonElements(int Mat[][], int r, int c) |
| 73 | { |
| 74 | // pick one by one element of the first row and check if they are present in all rows. |
Tested by
no test coverage detected