Expand description
Functions§
- binary_
search - 二分查找/Binary search (要求数组已排序/Array must be sorted)
- chunk
- 将数组分块/Chunk an array into smaller arrays
- count
- 统计元素出现次数/Count element occurrences
- count_
by - 按指定键函数统计元素出现次数/Count elements by key function
- dedup_
sorted - 已排序数组去重/Remove duplicates from sorted array
- linear_
search - 线性搜索/Linear search
- longest_
common_ prefix - 查找字符串数组的最长公共前缀/Longest common prefix of strings
- max_
subarray_ sum - 最大子数组和(Kadane算法)/Maximum subarray sum (Kadane’s algorithm)
- merge_
sorted - 合并两个已排序数组合并保持顺序/Merge two sorted arrays
- repeat_
fill - 用模式重复填充数组/Repeat pattern to fill array
- reverse
- 反转数组/Reverse an array
- shuffle
- 随机打乱数组/Randomly shuffle array (Fisher-Yates算法/Fisher-Yates algorithm)
- slice_
cmp - 切片比较(类似字典序)/Slice comparison (lexicographical order)
- sliding_
window_ max - 滑动窗口最大值/Sliding window maximum
- split_
at_ checked - 安全的分割切片/Safely split slice at index