set

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BSTSet

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

base on binary search tree

func NewBSTSet

func NewBSTSet() *BSTSet

func (*BSTSet) Add

func (b *BSTSet) Add(e interface{})

func (*BSTSet) Contains

func (b *BSTSet) Contains(e interface{}) bool

func (*BSTSet) IsEmpty

func (b *BSTSet) IsEmpty() bool

func (*BSTSet) Remove

func (b *BSTSet) Remove(e interface{})

func (*BSTSet) Size

func (b *BSTSet) Size() int

func (*BSTSet) String

func (b *BSTSet) String() string

type ISet

type ISet interface {
	Add(interface{})
	Remove(interface{})
	Contains(interface{}) bool
	Size() int
	IsEmpty() bool
}

type LinkedListSet

type LinkedListSet struct {
	LinkedList *list.LinkedList
}

base on linked list

func NewLinkedListSet

func NewLinkedListSet() *LinkedListSet

func (*LinkedListSet) Add

func (l *LinkedListSet) Add(e interface{})

func (*LinkedListSet) Contains

func (l *LinkedListSet) Contains(e interface{}) bool

func (*LinkedListSet) IsEmpty

func (l *LinkedListSet) IsEmpty() bool

func (*LinkedListSet) Remove

func (l *LinkedListSet) Remove(e interface{})

func (*LinkedListSet) Size

func (l *LinkedListSet) Size() int

Jump to

Keyboard shortcuts

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