Documentation ¶
Index ¶
- type PQNode
- type PriorityQueue
- type Set
- func (s Set[T]) Copy() Set[T]
- func (s Set[T]) Difference(other Set[T]) Set[T]
- func (s Set[T]) Equals(other Set[T]) bool
- func (s Set[T]) Has(element T) bool
- func (s Set[T]) Insert(element T)
- func (s Set[T]) Intersection(other Set[T]) Set[T]
- func (s Set[T]) Iterate() []T
- func (s Set[T]) Len() int
- func (s Set[T]) Remove(element T)
- func (s Set[T]) SymmetricDifference(other Set[T]) Set[T]
- func (s Set[T]) Union(other Set[T]) Set[T]
- type SortedMap
- type SortedSet
- func (s SortedSet[T]) Difference(other SortedSet[T]) SortedSet[T]
- func (s SortedSet[T]) Equals(other SortedSet[T]) bool
- func (s SortedSet[T]) Has(element T) bool
- func (s SortedSet[T]) Insert(element T)
- func (s SortedSet[T]) Intersection(other SortedSet[T]) SortedSet[T]
- func (s SortedSet[T]) Iterate() []T
- func (s SortedSet[T]) Len() int
- func (s SortedSet[T]) Remove(element T)
- func (s SortedSet[T]) SymmetricDifference(other SortedSet[T]) SortedSet[T]
- func (s SortedSet[T]) Union(other SortedSet[T]) SortedSet[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PQNode ¶
type PQNode struct { // 최소 힙(Min Heap)을 사용 // 최소 힙에서는 부모 노드의 값이 자식 노드의 값보다 항상 작거나 같아야 합니다. Priority int // contains filtered or unexported fields }
type PriorityQueue ¶
type PriorityQueue interface { // Push add a new node Push(*PQNode) error // Pop remove the highest priority node and return it Pop() *PQNode // Len return length of q Len() int }
PriorityQueue is a Priority queue based on a min heap.
func NewPriorityQueue ¶
func NewPriorityQueue(capacity int) PriorityQueue
NewPriorityQueue returns a new PriorityQueue.
type Set ¶
type Set[T comparable] map[T]bool
func (Set[T]) SymmetricDifference ¶
SymmetricDifference 대칭 차집합 연산, 두 Set 중 하나에만 포함된 요소
type SortedMap ¶
func (*SortedMap[K, V]) SortedKeys ¶
type SortedSet ¶
func (SortedSet[T]) Difference ¶
Difference 차집합 연산
func (SortedSet[T]) Intersection ¶
Intersection 교집합 연산
func (SortedSet[T]) SymmetricDifference ¶
SymmetricDifference 대칭 차집합 연산, 두 Set 중 하나에만 포함된 요소
Click to show internal directories.
Click to hide internal directories.