14 lines
273 B
Go
14 lines
273 B
Go
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),
|
|
}
|
|
}
|