mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-17 16:12:42 +08:00
19 lines
208 B
Go
19 lines
208 B
Go
package collections
|
|
|
|
// 列表
|
|
type List[T any] interface {
|
|
Add(T)
|
|
Delete(T)
|
|
Count() int
|
|
ToSlice() []T
|
|
}
|
|
|
|
// 队列
|
|
type Queue[T any] interface {
|
|
Put(T)
|
|
Poll() T
|
|
Peek() T
|
|
Size() int
|
|
IsEmpty() bool
|
|
}
|