Skip to content

Create 83. Remove Duplicates from Sorted List.md#2

Open
Rinta-Rinta wants to merge 1 commit intomainfrom
83.-Remove-Duplicates-from-Sorted-List
Open

Create 83. Remove Duplicates from Sorted List.md#2
Rinta-Rinta wants to merge 1 commit intomainfrom
83.-Remove-Duplicates-from-Sorted-List

Conversation

@Rinta-Rinta
Copy link
Copy Markdown
Owner

araiさんの動画を見てみた。
https://www.youtube.com/watch?v=foMqZAL00UU
アルゴリズム自体は自分と同じだったが、動画ではサイクルについて言及されていた。自分はサイクルについて考えなかったので、参考になった。
参考になったが、ソートされててサイクルがあるってどういうことなんだと感じた。
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

これ、どちらかというと「ゴミを突っ込まれたときの動作」が気になっていると思います。
https://docs.google.com/document/d/11HV35ADPo9QxJOpJQ24FcZvtvioli770WWdZZDaLOfg/edit?tab=t.0#heading=h.jdtk9v35bca4

気持ちとして「止まらない」というのが一番嫌なんですね。変な値が返って来るのだとまだしようがあるけれども、止まらないとどうしようもないので。

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

コメントありがとうございます。
動くか、動かないかだけでなく、実際に使う場面やそこで生じるエラーまで想像できているかが、このような視点を生むんですね。
すごく納得し勉強になりました。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

まあ、もちろん、すべてをバリデートするわけにはいきません(例えば二分探索ができる確認のために全要素を確認したら意味がない)が、しかし、ゴミを入れられたら何が起きるかは常にうっすら考えているわけです。

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.

2 participants