# アルゴ式: 847 デック (Swift)

## [デック](https://algo-method.com/tasks/847)

- [Xcode Playgroundで動作しない][gh]ので困っている
- `DeQue` は `Struct`にして、`class`を中に入れる方法で実装
- メソッドも中に入れた
- Optional Chainingを使って実装されている方がいるけど、まだ自分はそこら辺はちゃんと勉強できていない
- Xcode Playgroundが使えずで右往左往していたけれども、全体的には納得いく実装にはなった気がする
- 以前の、enumで `Linked List` の実装に挑戦したけれどもうまく動作しなかったのも似た要因なのだろうか

[editorial]: https://algo-method.com/tasks/847/editorial
[gh]: https://github.com/tockrock/competitiveprogramming-swift/blob/37a7484e1dc4af58a9728b0f0cd6bd0982722080/algo847.playground/Contents.swift


### 提出

- [AC](https://algo-method.com/submissions/371092)
