Documentation ¶
Index ¶
- type GetMidNum
- type MaxSlidingWindowByPQ
- type PriorityQueue
- func (m *PriorityQueue) Empty() bool
- func (m *PriorityQueue) GetAttribute() *C.Attribute
- func (m *PriorityQueue) Offer(value interface{})
- func (m *PriorityQueue) Peak() interface{}
- func (m *PriorityQueue) Poll() interface{}
- func (m *PriorityQueue) Resize()
- func (m *PriorityQueue) Size() int
- func (m *PriorityQueue) Update(value interface{})
- type ReturnKMinByHeapSort
- type ReturnKMinByQuickSort
- type WordFrequency
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetMidNum ¶
type GetMidNum struct {
// contains filtered or unexported fields
}
func NewGetMidNum ¶
func NewGetMidNum() *GetMidNum
func (*GetMidNum) FindMedian ¶
func (*GetMidNum) GetAttribute ¶
type MaxSlidingWindowByPQ ¶
type MaxSlidingWindowByPQ struct {
// contains filtered or unexported fields
}
*
- @author ljfirst
- @version V1.0
- @date 2023/7/26 00:15
- @author-Email ljfirst@mail.ustc.edu.cn
- @blogURL https://blog.csdn.net/ljfirst
- @description 滑动窗口的最大值 *
func (*MaxSlidingWindowByPQ) GetAttribute ¶
func (m *MaxSlidingWindowByPQ) GetAttribute() *C.Attribute
type PriorityQueue ¶
type PriorityQueue struct { IsSmallHeap bool Comp C.Compare // 比较器 // contains filtered or unexported fields }
*
- @author ljfirst
- @version V1.0
- @date 2023/6/27 01:12
- @author-Email ljfirst@mail.ustc.edu.cn
- @blogURL https://blog.csdn.net/ljfirst
- @description 优先队列 *
func NewPriorityQueue ¶
func NewPriorityQueue(options ...C.Options) *PriorityQueue
func (*PriorityQueue) Empty ¶
func (m *PriorityQueue) Empty() bool
func (*PriorityQueue) GetAttribute ¶
func (m *PriorityQueue) GetAttribute() *C.Attribute
func (*PriorityQueue) Offer ¶
func (m *PriorityQueue) Offer(value interface{})
func (*PriorityQueue) Peak ¶
func (m *PriorityQueue) Peak() interface{}
func (*PriorityQueue) Poll ¶
func (m *PriorityQueue) Poll() interface{}
func (*PriorityQueue) Resize ¶
func (m *PriorityQueue) Resize()
func (*PriorityQueue) Size ¶
func (m *PriorityQueue) Size() int
func (*PriorityQueue) Update ¶
func (m *PriorityQueue) Update(value interface{})
type ReturnKMinByHeapSort ¶
type ReturnKMinByHeapSort struct { }
*
- @author ljfirst
- @version V1.0
- @date 2023/6/27 19:27
- @author-Email ljfirst@mail.ustc.edu.cn
- @blogURL https://blog.csdn.net/ljfirst
- @description 返回数组中最小的 k 个元素 -> 堆排法 *
func (*ReturnKMinByHeapSort) GetAttribute ¶
func (m *ReturnKMinByHeapSort) GetAttribute() *C.Attribute
func (*ReturnKMinByHeapSort) ReturnKMin ¶
func (m *ReturnKMinByHeapSort) ReturnKMin(array []int, k int) []int
type ReturnKMinByQuickSort ¶
type ReturnKMinByQuickSort struct { }
*
- @author ljfirst
- @version V1.0
- @date 2023/6/27 19:28
- @author-Email ljfirst@mail.ustc.edu.cn
- @blogURL https://blog.csdn.net/ljfirst
- @description 返回数组中最小的 k 个元素 -> 快排法 *
func (*ReturnKMinByQuickSort) GetAttribute ¶
func (m *ReturnKMinByQuickSort) GetAttribute() *C.Attribute
func (*ReturnKMinByQuickSort) ReturnKMin ¶
func (m *ReturnKMinByQuickSort) ReturnKMin(array []int, k int) []int
type WordFrequency ¶
type WordFrequency struct { }
*
- @author ljfirst
- @version V1.0
- @date 2023/6/27 01:12
- @author-Email ljfirst@mail.ustc.edu.cn
- @blogURL https://blog.csdn.net/ljfirst
- @description 词频统计
- 实现统计一篇英文文章内每个单词的出现频率,并返回出现频率最高的前3个单词及其出现次数 *
func (*WordFrequency) GetAttribute ¶
func (m *WordFrequency) GetAttribute() *C.Attribute
func (*WordFrequency) Statistics ¶
func (m *WordFrequency) Statistics(words []string) []string
Click to show internal directories.
Click to hide internal directories.