func GetUnion(list1, list2 DoublyLinkedList) DoublyLinkedList {
	res := DoublyLinkedList{}

	curr := list1.Head
	for curr != nil {
		if !res.HasElem(curr.value) {
			res.Append(curr.value)
		}

		curr = curr.right
	}

	curr = list2.Head
	for curr != nil {
		if !res.HasElem(curr.value) {
			res.Append(curr.value)
		}

		curr = curr.right
	}

	return res
}
// GetUnion gets the union of two linked list
GetUnion gets the union of two linked list
// GetUnion gets the union of two linked list
func GetUnion(list1, list2 DoublyLinkedList) DoublyLinkedList {
	res := DoublyLinkedList{}
	curr := list1.Head
	for curr != nil {
		if !res.HasElem(curr.value) {
			res.Append(curr.value)
		}
		curr = curr.right
	}
	curr = list2.Head
	for curr != nil {
		if !res.HasElem(curr.value) {
			res.Append(curr.value)
		}
		curr = curr.right
	}
	return res
}
func GetUnion ( list1 , list2 DoublyLinkedList ) DoublyLinkedList { res := DoublyLinkedList { } curr := list1 . Head for curr != nil { if ! res . HasElem ( curr . value ) { res . Append ( curr . value ) } curr = curr . right } curr = list2 . Head for curr != nil { if ! res . HasElem ( curr . value ) { res . Append ( curr . value ) } curr = curr . right } return res }
GetUnion gets the union of two linked list
GetUnion gets the union of two linked list