I want to merge the values of two arrays and if there is a duplicate number count them once
For example
x = { 1, 2, 3, 4 }
y = { 3, 4, 5, 6, 7 }
so result should be
z = { 1, 2, 3, 4, 5, 6, 7}
3 and 4 were duplicate values that I have merged
I want to write c code but I don't know logic What would be a simple algorithm for this
For example
x = { 1, 2, 3, 4 }
y = { 3, 4, 5, 6, 7 }
so result should be
z = { 1, 2, 3, 4, 5, 6, 7}
3 and 4 were duplicate values that I have merged
I want to write c code but I don't know logic What would be a simple algorithm for this