Skip to content

Conversation

@docto-rin
Copy link
Owner

232. Implement Queue using Stacks


Next: 278. First Bad Version

> - https://www.slideshare.net/hamukazu/ss-10114639
> - https://www.cs.cmu.edu/~rwh/students/okasaki.pdf
- 分かりやすく面白い資料だった。
- 「私の期待」というのは、補充でstackを反転させる操作に遅延評価を使うことで、均さなくてもO(1)を実現できることだと推測した。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あ、これは償却でいいと思います。遅延させるのはちょっと大変です。
やるならば、Generator でも使えばできますかねー。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants