Arrays-intersection of two arrays


getting wrong answer in all testcases.
pls tell the correct code

Check the sample output.Your sample output must match exactly with your output.
Also the output is in sorted order.
Check this: