Skip to content

Instantly share code, notes, and snippets.

Last active June 27, 2021 06:52
What would you like to do?
Length of linked list
func Length(head *Node) int {
len := 0
for ; head != nil; head = head.Next {
fmt.Println("Length = ", len)
return len
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment