Conversation
oda
reviewed
Jan 11, 2026
| そもそもListじゃないからIndexをどう追うか? | ||
|
|
||
| ## step2 | ||
| 自分が書いたコードを貼って解説をGPTにしてもらったところ、問題文の読み間違えに気づいた。 |
There was a problem hiding this comment.
このあたりの整え方を見ておいてください。
あ、私のしているコメントを GPT に放り込んでどう思うかなどを聞くのもいいです。
https://docs.google.com/document/d/11HV35ADPo9QxJOpJQ24FcZvtvioli770WWdZZDaLOfg/edit?tab=t.0#heading=h.9kpbwslvv3yv
TakayaShirai
left a comment
There was a problem hiding this comment.
一旦自分の中でどうすれば解けるかをまとめてから、それをコードでどう表現するかという流れで問題に取り組むと、最初から動くコードが書けるかなと感じます。
これも読むと参考になると思います!
https://discord.com/channels/1084280443945353267/1246383603122966570/1252209488815984710
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.
問題リンク
https://leetcode.com/problems/linked-list-cycle-ii/description/
問題文の概要
Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null.
There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node that tail's next pointer is connected to (0-indexed). It is -1 if there is no cycle. Note that pos is not passed as a parameter.
Do not modify the linked list.
次に解く予定の問題
https://leetcode.com/problems/remove-duplicates-from-sorted-list/description/