Skip to content

Commit

Permalink
Update queue.go
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzotinfena committed Apr 17, 2024
1 parent 1d224c8 commit 9972f30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions collections/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ func NewQueue[T any]() *Queue[T] {
}
}

func (q *Queue[T]) Len() int { return q.l.Len() }
func (q *Queue[T]) Len() int { return q.l.Len() }

func (q *Queue[T]) Enqueue(value T) { q.l.InsertLast(value) }

func (q *Queue[T]) Dequeue() T { return q.l.RemoveFirst() }
func (q *Queue[T]) Dequeue() T { return q.l.RemoveFirst() }

func (q *Queue[T]) Preview() T { return q.l.First() }
func (q *Queue[T]) Preview() T { return q.l.First() }

func (q Queue[T]) String() string { return q.l.String() }
func (q Queue[T]) String() string { return q.l.String() }

0 comments on commit 9972f30

Please sign in to comment.