The average time for heap insertion is O(1) and O(log N) for worst case (see here: https://stackoverflow.com/a/39517553/14714339). Since priority queues can be implemented w