循環リスト

LeetCode

【LeetCode】 142. Linked List Cycle II 解答・解説【Python】

はじめに LeetCodeの問題を解答します。 なるべく、問題の和訳と詳細なコメントを書いています。 余裕があれば、複数のアプローチの解答と、実際の面接を想定して英語での解法やコメントを書いています。 ...
LeetCode

【LeetCode】61. Rotate List 解答・解説【Python】

問題 原文 Given the head of a linked list, rotate the list to the right by k places. Example 1: Example 2:...
LeetCode

【LeetCode】141. Linked List Cycle 解答・解説【Python】

問題 原文 Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in ...