# Create an empty array, then insert (Priority Queue)

**URL:** <https://discourse.julialang.org/t/create-an-empty-array-then-insert-priority-queue/63425>\
**Category:** New to Julia\
**Tags:** array\
**Created:** [June 23, 2021, 8:54am UTC](https://discourse.julialang.org/t/create-an-empty-array-then-insert-priority-queue/63425 "2021-06-23T08:54:42Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [June 23, 2021, 4:57pm UTC](https://discourse.julialang.org/t/create-an-empty-array-then-insert-priority-queue/63425/6 "2021-06-23T16:57:44Z")

</div>

Oh, btw, since you mentioned priority queues in your title, there is a PriorityQueue data structure in the DataStructures package:

[http://juliacollections.github.io/DataStructures.jl/v0.11/priority-queue.html](http://juliacollections.github.io/DataStructures.jl/v0.11/priority-queue.html)

It requires unique priority keys, however (which is a bit annoying to be honest).

---

_[View the full topic](https://discourse.julialang.org/t/create-an-empty-array-then-insert-priority-queue/63425)._
