linkedlist

package
v0.0.0-...-28b160d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package linkedlist provides methods for linked lists handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkedList

type LinkedList struct {
	// contains filtered or unexported fields
}

func (*LinkedList) Find

func (l *LinkedList) Find(value interface{}) bool

Find a node by value in the linked list, return true if exists

func (*LinkedList) Insert

func (l *LinkedList) Insert(d interface{})

Insert a new node at the end of linked list

func (*LinkedList) Invert

func (l *LinkedList) Invert()

Invert the linked list

func (*LinkedList) Len

func (l *LinkedList) Len() int

Return the number of elements in the list

func (*LinkedList) Remove

func (l *LinkedList) Remove(val interface{}) bool

Remove node from list by value, returns the if it was removed

func (*LinkedList) Show

func (l *LinkedList) Show()

Show all values of the list

type Node

type Node struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL