Wrong Answer in test case

It says wrong answer but I don’t understand why .
Please Suggest problem

Code - https://ide.codingblocks.com/s/101536

In the case of equality, you are incrementing both the lists but adding only one element. So, if the same element is present in both the lists, it will appear in final list only once, whereas it should appear twice. So, remove the ‘else if’ block for the equality case and put ‘<=’ in any one of the above cases.

For example, for the test case :
1
5
1 2 3 4 5
6
3 4 5 6 7 8

Actual output: 1 2 3 3 4 4 5 5 6 7 8
Your output : 1 2 3 4 5 6 7 8