Beispiel #1
0
func NewBinaryHeap(comparator container.CompareFunction) *BinaryHeap {
	return &BinaryHeap{
		list:       lists.NewArrayList(),
		comparator: comparator,
	}
}
Beispiel #2
0
func NewArrayStack() *ArrayStack {
	return &ArrayStack{
		list: lists.NewArrayList(),
	}
}