LeetCode 344. Reverse String
Description Write a function that takes a string as input and returns the string reversed.
Description Write a function that takes a string as input and returns the string reversed.
๋กฏ๋ฐ์ ๋ณดํต์ ์คํํํด ์ค๋์
๋ฌธ์์ด์ ์์ฑํด๋ณด์. new String(โHelloโ); vs โHelloโ; Java์์ ๋ฌธ์์ด(String)์ ์ ์ธํ๋ ๋ฐฉ๋ฒ์ ์๋์ ๊ฐ๋ค.
์ด์ง ํ์ ํธ๋ฆฌ๋ฅผ ๊ตฌํํด๋ณด์. ์์ ๊ธ์์๋ ์ด์ง ํ์ ํธ๋ฆฌ(Binary Search Tree)์ ๋ํ ์ด๋ก ์ ์ดํด๋ณด์๋ค. ์ด์ ์๋ฐ(Java) ์ธ์ด๋ก ์ด์ง ํ์ ํธ๋ฆฌ๋ฅผ ๊ตฌํํด๋ณด์.
์ด์ง ํธ๋ฆฌ ์ด์ง ํ์ ํธ๋ฆฌ(Binary Search Tree)๋ฅผ ์์๋ณด๊ธฐ ์ ์ ์ฐ์ ์ด์ง ํธ๋ฆฌ(Binary Tree)๊ฐ ๋ฌด์์ธ์ง ์์์ผํ๋ค. ์ ์๋ ๋น์ด์๊ฑฐ๋, ํ ๊ฐ์ ๋ฃจํธ์ ๋ค๋ฅธ ๋ ๊ฐ์ ๋ค๋ฅธ ๊ฐ์...
์ต์ ๋ฒ ํจํด์ด๋? ๊ฐ์ฒด์ ์ํ๊ฐ ๋ณ๊ฒฝ๋ ๋ ๊ทธ ๊ฐ์ฒด์ ์์กดํ๋ ๋ค๋ฅธ ๊ฐ์ฒด๊ฐ ๊ทธ ๋ณ๊ฒฝ์ ํต์ง๋ฐ๊ณ ์๋์ผ๋ก ๋ด์ฉ์ด ๊ฐฑ์ ๋๋๋ก ํ๋ ๋ฐฉ์์ ๋งํ๋ค. ๋ณดํต ์ํ๋ฅผ ๊ฐ๊ณ ์๋ ์ฃผ์ (Subject)...
๋๊ธฐํ? ๊ทธ๊ฒ์ ๋ฌด์์ผ๊น? ๋๊ธฐํ(Synchronization)๋ ์์ ๋ค ์ฌ์ด์ ์ํ ์๊ธฐ๋ฅผ ๋ง์ถ๋ ๊ฒ์ ๋งํฉ๋๋ค. ์๋ฐ์์ List, Set ๊ทธ๋ฆฌ๊ณ Map๊ณผ ๊ฐ์ ์ปฌ๋ ์ (Collection)์ ๊ตฌํ ํด๋์ค๋ฅผ ์ฌ์ฉํ ๋ ๋ฐ๋ก ์ด ๋๊ธฐํ๊ฐ...
Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain...
Description Given a string, find the length of the longest substring without repeating characters.
์๋ฐ ๋ ํผ๋ฐ์ค์ ๊ฐ์ฒด ์ฐธ์กฐ ์ฐ๋ฆฌ๋ ๋ณดํต ์๋ ์ฝ๋์ ๊ฐ์ด new ์ฐ์ฐ์๋ฅผ ์ด์ฉํ์ฌ ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ค. ๊ทธ๋ฆฌ๊ณ ์ด๋ฌํ ์ ํ์ ์ธ ๊ฐ์ฒด ์ฐธ์กฐ ๋ฐฉ์์ Strong Reference ๋ผ๊ณ ๋งํ๋ค.