From 70995c50985972bfce769a9ab273e4c54fe8b7ef Mon Sep 17 00:00:00 2001 From: dudaodong Date: Tue, 26 Apr 2022 10:18:43 +0800 Subject: [PATCH] feat: add PriorityQueue --- datastructure/queue/priorityqueue.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datastructure/queue/priorityqueue.go b/datastructure/queue/priorityqueue.go index f182a53..5007743 100644 --- a/datastructure/queue/priorityqueue.go +++ b/datastructure/queue/priorityqueue.go @@ -2,8 +2,7 @@ package datastructure import "github.com/duke-git/lancet/v2/lancetconstraints" -// PriorityQueue is a implemented by binary heap tree -// which are referred to as the left child and the right child. +// PriorityQueue is a priority queue implemented by binary heap tree // type T should implements Compare function in lancetconstraints.Comparator interface. type PriorityQueue[T any] struct { items []T