func GetIntersection(list1, list2 DoublyLinkedList) DoublyLinkedList {
	tmp := list1.Head
	res := DoublyLinkedList{}

	for tmp != nil {
		if list2.HasElem(tmp.value) {
			res.Append(tmp.value)
		}
		tmp = tmp.right
	}

	return res
}
// GetIntersection finds the intersection between two linked list
GetIntersection finds the intersection between two linked list
// GetIntersection finds the intersection between two linked list
func GetIntersection(list1, list2 DoublyLinkedList) DoublyLinkedList {
	tmp := list1.Head
	res := DoublyLinkedList{}
	for tmp != nil {
		if list2.HasElem(tmp.value) {
			res.Append(tmp.value)
		}
		tmp = tmp.right
	}
	return res
}
func GetIntersection ( list1 , list2 DoublyLinkedList ) DoublyLinkedList { tmp := list1 . Head res := DoublyLinkedList { } for tmp != nil { if list2 . HasElem ( tmp . value ) { res . Append ( tmp . value ) } tmp = tmp . right } return res }
GetIntersection finds the intersection between two linked list
GetIntersection finds the intersection between two linked list