package
Version:
v0.0.61
Opens a new window with list of versions in this module.
Published: Jul 10, 2023
License: BSD-3-Clause
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func GTArrayReverse(arr *[]string)
GTArrayReverse 数组倒序
IsContainWithStrArray 判断 字符串数组 是否包含 某个字符串
Array 可变长数组
MakeArray 新建一个可变长数组
时间复杂度为:O(1),因为分配内存空间和设置几个值是常数时间。
Append 增加一个元素
添加元素中,耗时主要在老数组中的数据移动到新数组,时间复杂度为:O(n)
func (a *Array) AppendMany(element ...int)
AppendMany 增加多个元素
Get 获取某个下标的元素
因为只获取下标的值,所以时间复杂度为 O(1)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.