Skip to content

Instantly share code, notes, and snippets.

Created Jul 4, 2021
What would you like to do?
CList DeleteList
func DeleteList(head **Node) {
fmt.Println("\nDeleting entire linkedlist")
var aux *Node
for *head != nil {
aux = (*head).Next
if aux == *head || aux == nil {
*head = nil
(*head).Next = nil
*head = aux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment