README ¶ NAME 13 - remove elements from singly linked list DESCRIPTION Problem Remove last n-th item from a singly linked list. Example: Input: [1 2 3 4 5] and n is 3 Output: [1 2 4 5] SEE ALSO Solution Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func LastNth(l *List, n int) type List func NewList(nn ...int) *List func (l *List) Slice() []int func (l *List) String() string type Node Examples ¶ LastNth Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func LastNth ¶ func LastNth(l *List, n int) Example ¶ package main import ( "fmt" "github.com/skhal/lab/iq/13/remove" ) func main() { l := remove.NewList(1, 2, 3, 4, 5) remove.LastNth(l, 3) fmt.Println(l) } Output: [1 2 4 5] Share Format Run Types ¶ type List ¶ type List struct { // contains filtered or unexported fields } func NewList ¶ func NewList(nn ...int) *List func (*List) Slice ¶ func (l *List) Slice() []int func (*List) String ¶ func (l *List) String() string type Node ¶ type Node struct { Value int // contains filtered or unexported fields } Source Files ¶ View all Source files last_nth.go Click to show internal directories. Click to hide internal directories.