Find elements which are present in first array and not in second given arrays are in sorted?solve in linear time and without using collections : static void findMissing(int a[], int b[], int n, int m) { for (int i = 0; i < n; i++) { int j; for (j = 0; j < m; j++) if (a[i] == b[j]) break; if (j == m) System.out.print(a[i] + " "); }