I have an exercise which says:
create a data type called total integers (double(same) values are not allowed)
How will i do this?
I have already a function removeduplicate s from another program which i create,that has as an argument the head of a list and removes the duplicates.
So in my exercise what is best? to create first the hole list and in the end call removeduplicate s? or should i make a check before i add each node?
create a data type called total integers (double(same) values are not allowed)
How will i do this?
I have already a function removeduplicate s from another program which i create,that has as an argument the head of a list and removes the duplicates.
So in my exercise what is best? to create first the hole list and in the end call removeduplicate s? or should i make a check before i add each node?
Comment