Open
Conversation
oda
reviewed
Mar 23, 2026
| https://ja.wikipedia.org/wiki/%E3%83%AB%E3%83%BC%E3%83%97%E5%B1%95%E9%96%8B | ||
|
|
||
| https://github.com/Yoshiki-Iwasa/Arai60/pull/59/changes#diff-8201a9b64da970a353f0eb106023266ce67230b908a5213848bdfa1793d8574c | ||
| - Erase-remove idiomのRust実装例。retain(), resize()メソッドどちらも使ったことがなく新しいメソッドを知れた。 |
There was a problem hiding this comment.
(してそうですが)新しいメソッドをみたら一応見ておきましょう。
https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain
https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize
nodchip
reviewed
Mar 24, 2026
| - 少しパズルに感じる。step2a.rsでErase-remove idiomを試してみる。 | ||
| */ | ||
|
|
||
| pub struct Solution {} |
There was a problem hiding this comment.
自分が面接官としてこの問題を出題するとしたら、 Erase-remove idiom を知っていて書けるかどうかを主題とすると思います。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題: 283. Move Zeroes
次に解く問題: 252. Meeting Rooms(LINTCODE版)
ファイルの構成:
./src/bin/<各ステップ>.rs