Displaying the list but leaving the head as it is
func (l LinkedList) Display() {
n := l.head
for n != nil {
fmt.Printf("%v-->", n.data)
n = n.next
}
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Displaying the list but leaving the head as it is
func (l LinkedList) Display() {
n := l.head
for n != nil {
fmt.Printf("%v-->", n.data)
n = n.next
}
}