MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / DynamicArray

Struct DynamicArray

structure/dynamicarray/dynamicarray.go:21–25  ·  view source on GitHub ↗

DynamicArray structure

Source from the content-addressed store, hash-verified

19
20// DynamicArray structure
21type DynamicArray struct {
22 Size int
23 Capacity int
24 ElementData []any
25}
26
27// Put function is change/update the value in array with the index and new value
28func (da *DynamicArray) Put(index int, element any) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected