func (l *DoublyLinkedList) SwapEveryTwo() {
	l.Head = swapEveryTwo(l.Head)

	newTail := l.Tail

	for newTail.right != nil {
		newTail = newTail.right
	}

	l.Head.left = nil
	l.Tail = newTail
}
// SwapEveryTwo swaps every two nodes in a linked list
SwapEveryTwo swaps every two nodes in a linked list
// SwapEveryTwo swaps every two nodes in a linked list
func (l *DoublyLinkedList) SwapEveryTwo() {
	l.Head = swapEveryTwo(l.Head)
	newTail := l.Tail
	for newTail.right != nil {
		newTail = newTail.right
	}
	l.Head.left = nil
	l.Tail = newTail
}
func ( l * DoublyLinkedList ) SwapEveryTwo ( ) { l . Head = swapEveryTwo ( l . Head ) newTail := l . Tail for newTail . right != nil { newTail = newTail . right } l . Head . left = nil l . Tail = newTail }
SwapEveryTwo swaps every two nodes in a linked list
SwapEveryTwo swaps every two nodes in a linked list