LeonorMalaga / gt_datalib

Práctica 2 del Taller de Git y GitHub de 42 Málaga
https://view.genial.ly/63a443410483340018b52bed/presentation-42-taller-de-git-y-github
0 stars 1 forks source link

set_union #18

Open martaga2 opened 3 months ago

martaga2 commented 3 months ago

t_set set_union(t_set set1, t_set set2) { t_set aux; t_set *new;

new = NULL;
aux = set1;
while (aux)
{
    set_add(&new, aux->data);
    aux = aux->next;
}
aux = set2;
while (aux)
{
    set_add(&new, aux->data);
    aux = aux->next;
}
return (new);

}