We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bd99fe commit 0d0395bCopy full SHA for 0d0395b
โlinked-list-cycle/mmyeon.ts
@@ -40,6 +40,9 @@ function hasCycle(head: ListNode | null): boolean {
40
* - ์ฌ์ดํด์ด ์์ผ๋ฉด ๋ ํฌ์ธํฐ๊ฐ ๊ฒฐ๊ตญ ๊ฐ์ ๋ ธ๋๋ฅผ ๊ฐ๋ฆฌํค๊ฒ ๋๋ฏ๋ก ํฌ ํฌ์ธํฐ ์ฌ์ฉ
41
* - ์ฌ์ดํด์ด ์๋ ๊ฒฝ์ฐ๋ฅผ ์ํด์ tail๋ ธ๋์ null์ฒดํฌ๋ฅผ ํด์ผํจ
42
*
43
+ * ์๊ฐ๋ณต์ก๋ : O(n)
44
+ * - ์ํ ์ด์ ๋ ธ๋์ ๊ฐ์ n๋งํผ ์ํํ๋ฉด์ ์ํ ์ฌ๋ถ ํ์ธ
45
+ *
46
* ๊ณต๊ฐ๋ณต์ก๋ : O(1)
47
* - ์ถ๊ฐ ๋ฉ๋ชจ๋ฆฌ์์ด slow, fast ํฌ์ธํฐ๋ง ์ฌ์ฉํ๋ฏ๋ก O(1)
48
*/
0 commit comments