rust-lang-ja / ac-library-rs

ac-library-rs is a rust port of AtCoder Library (ACL).
Creative Commons Zero v1.0 Universal
225 stars 27 forks source link

Add internal_queue #13

Closed TonalidadeHidrica closed 4 years ago

TonalidadeHidrica commented 4 years ago

No tests, no checks.

MiSawa commented 4 years ago

Why we use i32 as the index type? It'd probably more natural and convinient to use usize as other Rust standard libraries.

TonalidadeHidrica commented 4 years ago

I used i32 instead of usize in favor of the original code, but I agree that this is not idiomatic in Rust. However, if we are to replace some of them, we have to now decide to what extent we have to replace them. For now, I'll follow every comments on pull request, but I will not make any modification for the first time I create a new pull request.

TonalidadeHidrica commented 4 years ago

I changed my mind and use usize from beginning in some places.

TonalidadeHidrica commented 4 years ago

I added boundary check in pop function, but wondering if this is a good idea from the viewpoint of performance. After all, this structure is only used internally.