ds/impl_ring_linked_list.go

14 lines
273 B
Go
Raw Permalink Normal View History

2023-07-10 17:16:51 +02:00
package ds
type LinkedListRing[T any] struct {
*ListRing[T, *LinkedList[*T]]
}
var _ Ring[int] = &LinkedListRing[int]{}
func NewLinkedListRing[T any](size int) *LinkedListRing[T] {
return &LinkedListRing[T]{
ListRing: NewListRing[T](NewLinkedList[*T](), size),
}
}