MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / DefaultNew

Function DefaultNew

structure/hashmap/hashmap.go:24–29  ·  view source on GitHub ↗

DefaultNew returns a new HashMap instance with default values

()

Source from the content-addressed store, hash-verified

22
23// DefaultNew returns a new HashMap instance with default values
24func DefaultNew() *HashMap {
25 return &HashMap{
26 capacity: defaultCapacity,
27 table: make([]*node, defaultCapacity),
28 }
29}
30
31// New creates a new HashMap instance with the specified size and capacity
32func New(size, capacity uint64) *HashMap {

Callers 1

TestHashMapFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestHashMapFunction · 0.74