Here is my code: https://www.codechef.com/viewsolution/15529803
The expected output is also produced. The output format is also correct. Please help me with the code.
Thanks a lot!
Please help me out with this code!
Your approach fails if array has values with more than 1 digit.
Say your first array is {1,3} and second is {12,13}. Second Array is taken as string, so its β1213β. Now, β1213β.contains(1) is true, because string has β1β . Thats the error in your implementation
1 Like