Arrays-insertion of two arrays hashing problem

segmentation fault

hello @bhattanurag426

v is empty vector u cant use indexing over it.

use push_back to insert in the end

https://ide.codingblocks.com/s/478374 updated the code but its not working for case 0

the logic is partially correct.

for example ->
if array1 is 1 1 1
and array2 is 1 1
then u will print 1 1 1 which is wrong only 1 1 should in output.

take help of frequency to decide whether to include or not

ok got it… thank you

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.