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

Function BoolArrayCapUp

strings/ahocorasick/shared.go:78–83  ·  view source on GitHub ↗

BoolArrayCapUp Dynamically increases an array size of bool's by 1.

(old []bool)

Source from the content-addressed store, hash-verified

76
77// BoolArrayCapUp Dynamically increases an array size of bool's by 1.
78func BoolArrayCapUp(old []bool) (new []bool) {
79 new = make([]bool, cap(old)+1)
80 copy(new, old)
81 // old = new
82 return new
83}
84
85// ArrayUnion Concats two arrays of int's into one.
86func ArrayUnion(to, from []int) (concat []int) {

Callers 1

ConstructTrieFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected