Versions in this module Expand all Collapse all v1 v1.3.0 Mar 8, 2025 v1.2.0 Jan 2, 2025 v1.1.0 Jan 2, 2025 v1.0.0 Jan 1, 2025 Changes in this version + func ArrayToFrequencyMap[T comparable](arr []T) map[T]int + func ArrayToMap[K comparable, V any](arr [][2]any) map[K]V + func ArrayToMatrix[T any](arr []T, cols int) [][]T + func ArrayToSet[T comparable](arr []T) map[T]struct + func ArrayToSortedArray[T orderable](arr []T) []T + func BinaryTreeToArray[T any](root *TreeNode[T]) []T + func DeepCopy(src, dst interface{}) error + func DeserializeFromString(data string, v interface{}, format SerializationFormat) error + func FrequencyMapToArray[T comparable](freq map[T]int) []T + func LinkedListToArray[T any](head *Node[T]) []T + func MapToArray[K comparable, V any](m map[K]V) [][2]any + func MatrixToArray[T any](matrix [][]T) []T + func RegisterTypes() + func SerializeToString(v interface{}, format SerializationFormat, prettyPrint bool) (string, error) + func SetToArray[T comparable](set map[T]struct{}) []T + type Any interface + type Comparable interface + type ExampleStruct struct + ID int + Metadata map[string]interface{} + Name string + Tags []string + type GobSerializer struct + func (s GobSerializer) Deserialize(data []byte, v interface{}) error + func (s GobSerializer) Serialize(v interface{}) ([]byte, error) + type Iterator interface + HasNext func() bool + Next func() T + Reset func() + type JSONSerializer struct + PrettyPrint bool + func (s JSONSerializer) Deserialize(data []byte, v interface{}) error + func (s JSONSerializer) Serialize(v interface{}) ([]byte, error) + type LinkedListIterator struct + func NewLinkedListIterator[T any](head *Node[T]) *LinkedListIterator[T] + func (it *LinkedListIterator[T]) HasNext() bool + func (it *LinkedListIterator[T]) Next() T + func (it *LinkedListIterator[T]) Reset() + type MapIterator struct + func NewMapIterator[K comparable, V any](data map[K]V, keyOrder func([]K)) *MapIterator[K, V] + func (it *MapIterator[K, V]) HasNext() bool + func (it *MapIterator[K, V]) Next() (K, V) + func (it *MapIterator[K, V]) Reset() + type Node struct + Next *Node[T] + Value T + func ArrayToLinkedList[T any](arr []T) *Node[T] + type Numeric interface + type Ordered interface + type SerializationFormat string + const FormatGOB + const FormatJSON + const FormatXML + type SerializationHelper struct + Format SerializationFormat + PrettyPrint bool + func NewSerializationHelper(format SerializationFormat, prettyPrint bool) *SerializationHelper + func (h *SerializationHelper) Deserialize(data string, v interface{}) error + func (h *SerializationHelper) Serialize(v interface{}) (string, error) + type Serializer interface + Deserialize func(data []byte, v interface{}) error + Serialize func(v interface{}) ([]byte, error) + func GetSerializer(format SerializationFormat, prettyPrint bool) (Serializer, error) + type SliceIterator struct + func NewSliceIterator[T any](data []T) *SliceIterator[T] + func (it *SliceIterator[T]) HasNext() bool + func (it *SliceIterator[T]) Next() T + func (it *SliceIterator[T]) Reset() + type TraversalOrder int + const InOrder + const LevelOrder + const PostOrder + const PreOrder + type TreeIterator struct + func NewTreeIterator[T any](root *TreeNode[T], order TraversalOrder) *TreeIterator[T] + func (it *TreeIterator[T]) HasNext() bool + func (it *TreeIterator[T]) Next() T + func (it *TreeIterator[T]) Reset() + type TreeNode struct + Left *TreeNode[T] + Right *TreeNode[T] + Value T + func ArrayToBinaryTree[T any](arr []T) *TreeNode[T] + type XMLSerializer struct + PrettyPrint bool + func (s XMLSerializer) Deserialize(data []byte, v interface{}) error + func (s XMLSerializer) Serialize(v interface{}) ([]byte, error)