somedata

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeque

func NewDeque[T any]() *deque[T]

NewDeque - creates double-ended queue data structure

func NewDict

func NewDict[T comparable]() *dict[T]

NewDict - creates dict

Types

type DisjointSet

type DisjointSet[T comparable] interface {
	MakeSet(x T)
	Find(x T) T
	Union(x, y T)
}

type LinkedList

type LinkedList[T any] struct {
	// contains filtered or unexported fields
}

func NewLinkedList

func NewLinkedList[T any]() *LinkedList[T]

func (*LinkedList[T]) Add

func (v *LinkedList[T]) Add(value T)

Add - push element to list

func (*LinkedList[T]) Clear

func (v *LinkedList[T]) Clear()

Clear - fully clears linked list data

func (*LinkedList[T]) Head

func (v *LinkedList[T]) Head() (head T, ok bool)

Head - linked list header element

func (*LinkedList[T]) Pop

func (v *LinkedList[T]) Pop() (head T, ok bool)

Pop - pops element from list

func (*LinkedList[T]) Size

func (v *LinkedList[T]) Size() int

Size - linked list size

func (*LinkedList[T]) Slice

func (v *LinkedList[T]) Slice() []T

Slice - get type Slice with elements

func (*LinkedList[T]) Tail

func (v *LinkedList[T]) Tail() (tail T, ok bool)

Tail - linked list tail element

Jump to

Keyboard shortcuts

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