lists

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: BSD-2-Clause, ISC Imports: 2 Imported by: 225

Documentation

Overview

Package lists provides an abstract List interface.

In computer science, a list or sequence is an abstract data type that represents an ordered sequence of values, where the same value may occur more than once. An instance of a list is a computer representation of the mathematical concept of a finite sequence; the (potentially) infinite analog of a list is a stream. Lists are a basic example of containers, as they contain other values. If the same value occurs multiple times, each occurrence is considered a distinct item.

Reference: https://en.wikipedia.org/wiki/List_%28abstract_data_type%29

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List interface {
	Get(index int) (interface{}, bool)
	Remove(index int)
	Add(values ...interface{})
	Contains(values ...interface{}) bool
	Sort(comparator utils.Comparator)
	Swap(index1, index2 int)
	Insert(index int, values ...interface{})
	Set(index int, value interface{})

	containers.Container
}

List interface that all lists implement

Directories

Path Synopsis
Package arraylist implements the array list.
Package arraylist implements the array list.
Package doublylinkedlist implements the doubly-linked list.
Package doublylinkedlist implements the doubly-linked list.
Package singlylinkedlist implements the singly-linked list.
Package singlylinkedlist implements the singly-linked list.

Jump to

Keyboard shortcuts

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