# アルゴ式: 927 Q12. タスクリスト (3) (Swift)

## [Q12. タスクリスト (3)](https://algo-method.com/tasks/927)

- 最初は作成順をqueueの順番で直接していたけれども、必要ないなということで、Structで持つように修正
- 自動的にカウントしてくれているのは間違いがなくていいね
- 今更ならがら、[Swift CollectionsのHeap](https://github.com/apple/swift-collections/tree/main/Sources/PriorityQueueModule)も見た
- [PriorityQueue](https://github.com/apple/swift-collections/pull/51)はまだ現段階ではマージされていない
- Heapがまずは用意して、PriorityQueueはそれを利用して実装かな
- ここまで毎回、構造化するのは難しいけれども、いくつかやっていることは盗みたい

[editorial]: https://algo-method.com/tasks/927/editorial

### 提出

- [AC](https://algo-method.com/submissions/449809)
- [counterの内包化](https://algo-method.com/submissions/449809)
