We need to check if 2 arrays are similar or not. The elements can be duplicate as well. For example A = {2,3,4,5,6,6} and B = {3,6,2,4,6,5} are similar.
I have a nai
A = {2,3,4, 5,-1,6} and B = {3,6,2,4,6,5}
you should add break in your if-statement, without it your code will work only is there is no duplicates