MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / seen

Method seen

CommonMatrixElements.java:64–71  ·  view source on GitHub ↗
(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.

Callers 1

commonElementsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected