Golang has both len(array) and cap(array). The former returns the length of the array/slice (that being the amount of elements the array has); as I understand it, that function is O(1)
However, I don't know the efficiency of the latter; is it O(1) as well?