์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- spring data jpa
- ๋ฐ์ผ๋ฆฌ์ฝ๋ฉ
- ์๊ณ ๋ฆฌ์ฆ
- Spring Data JDBC
- java
- ๊ทธ๋ฆฌ๋
- ์ปฌ๋ ์ ํ๋ ์์ํฌ
- ๊ฑฐ๋ญ์ ๊ณฑ
- ํ์ดํ๋ก๊ทธ๋๋ฐ
- CLI๋ช ๋ น์ด
- ํ๊ณ
- Publishing
- ์ ๋ค๋ฆญ์ค
- FilterChain
- CSS
- ์๋ฐ
- ๋ฐฑ์๋
- ์ธํ ๋ฆฌ์ ์ด
- fibonacci
- ๋ถํธ์บ ํ
- ๊ณ์ฐ๊ธฐ๋ง๋ค๊ธฐ
- HTML
- Spring Security
- ๋ฌธ์์ด๋ค์ง๊ธฐ
- ์๋ฃ๊ตฌ์กฐ
- testing
- ๊นํ๋ธ
- ๋ฐฑ์ค์๊ณ ๋ฆฌ์ฆ
- ์คํ๋ง
- ์ฒซ๊ธ์๋๋ฌธ์
- Today
- Total
๋ชฉ๋ก๋ฐ์ผ๋ฆฌ์ฝ๋ฉ (12)
๋์ ๋ชจ์
โ๏ธ Description Return power input two numbers input base: int (base >= 2) exponent: int (exponent >= 0) output return long return rest of divided by 94,906,249 of the actual calculation results caution Avoid using Math.pow, power operators Time Complexity O(logN) example of in/output ong output = power(3, 40); System.out.println(output); // --> 19334827 ๐ TIL Power: Multiply the same number mult..
โ๏ธ Description Return whether the sample is a subset of the base by receiving two arrays input base: temporary Array with element of int sample: temporary Array with element of int output: boolean caution: no duplicates example of in/output int[] base = new int[]{1, 2, 3, 4, 5}; int[] sample = new int[]{1, 3}; boolean output = isSubsetOf(base, sample); System.out.println(output); // --> true sam..

โ๏ธ Description ์ ์๋ฅผ ์์๋ก ๊ฐ๋ ๋ฐฐ์ด์ ์ ๋ ฅ๋ฐ์ 3๊ฐ์ ์์๋ฅผ ๊ณฑํด ๋์ฌ ์ ์๋ ์ต๋๊ฐ ๋ฆฌํด ์ ๋ ฅ: int[] ํ์ ์ ์์๋ก ๊ฐ๋ ์์์ ๋ฐฐ์ด ์ถ๋ ฅ: int ์ฃผ์์ฌํญ ์ฃผ์ด์ง ๋ฐฐ์ด์ ์ค์ฒฉ๋์ง ์์ 1์ฐจ์ ๋ฐฐ์ด ๋ฐฐ์ด ์์๋ ์์์ 0์ ํฌํจํ๋ ์ ์ ๋ฐฐ์ด ๊ธธ์ด๋ 3 ์ด์ ์ ์ถ๋ ฅ ์์ int output = largestProductOfThree(new int[]{2, 1, 3, 7}); // --> 42 (= 2 * 3 * 7) output = largestProductOfThree(new int[]{-1, 2, -5, 7}); // --> 35 (= -1 * -5 * 7) ๐ Flow - ๊ฐ์ฅ ํฐ ์๋ฅผ ๊ณฑํ๊ธฐ => ์ค๋ฆ์ฐจ์ ์ ๋ ฌํด์ ๋งจ ๋ค์ ์ธ ๊ฐ ๊ณฑํด์ค - ๋ฐฐ์ด์ ์์ ์์ ๋ => ํฐ ..
โ๏ธ Description ์๋ฅผ ์ ๋ ฅ๋ฐ์ ์ ๊ณฑ๊ทผ ๊ฐ์ ์์์ ๋ ์๋ฆฌ๊น์ง ๋ฆฌํด ์ ๋ ฅ: int ํ์ ์ ์ ์ (num >= 2) ์ถ๋ ฅ: String ์ต๋ ์์์ ๋์งธ ์ง๋ฆฌ๊น์ง ๊ตฌํ ์๋ฅผ ๋ฌธ์์ด๋ก ๋ณํํ์ฌ ์ถ๋ ฅํฉ๋๋ค. (์์์ ์ ์งธ ์๋ฆฌ์์ ๋ฐ์ฌ๋ฆผ) ์ ์ถ๋ ฅ ์์ String output = computeSquareRoot(9); // --> "3.00" output = computeSquareRoot(6); // --> "2.45" ํํธ ์์์ ์ฒ๋ฆฌ๋ java ํ์ค ๋ด์ฅ ๊ฐ์ฒด์ธ String๋ฅผ ์ฌ์ฉ (java decimal places limit ๋๋ ์๋ฐ ์์์ ์๋ฆฌ์) ๋ฐ๋น๋ก๋์ ๋ฒ์ ์ ํ์(recurrence formula) https://ko.wikipedia.org/wiki/๋ฐ๋น๋ก๋์_๋ฒ ๐ Flow ..
โ๏ธ Description ๋ฌธ์์ด์ ์ ๋ ฅ๋ฐ์ ์์ด์๊ทธ๋จ์ธ์ง ์ฌ๋ถ๋ฅผ ๋ฆฌํด ์ ๋ ฅ: String ์ถ๋ ฅ: boolean ์ ์ถ๋ ฅ ์์ boolean output = isIsogram("aba"); // false output = isIsogram("Dermatoglyphics"); // true output = isIsogram("moOse"); // false ๐ Flow - ์ ๋ ฅ๋ฐ์ ๋ฌธ์์ด์ ํ๋์ฉ ์๋ผ์ => split() - ๋ฌธ์์ด ๋ฐฐ์ด์ ๋ด์์ ์ํ => forEach - ๊ฐ์ ๋ฌธ์๊ฐ ์๋์ง ์๋ค๋ก ์ฝ์ด์ค๋ฉด์ ๋น๊ต => indexOf, lastIndexOf - ๋ฌธ์ ๋น๊ตํด์ ๊ฐ์๊ฒ ์์ผ๋ฉด false ๋ฆฌํด ๐คฏ Trouble ๋์๋ฌธ์๋ ๊ตฌ๋ณํ์ง ์๋๋ค๊ณ ํด์ a == A ๋ก ์๊ฐํ๋ค. โ ๊ฐ์ด ์๋์ด a โ ..
โ๐ป Description Return String with one space from two spaces ๐ Flow - ๋จ์ด ํ ๊ธ์์ฉ ์ฝ์ด์์ ๋ด์ ๋ฌธ์๋ฐฐ์ด๋ณ์ ๋ง๋ค๊ธฐ => split() - ๊ณต๋ฐฑ 2๊ฐ๊ฐ ๋ค์ด์์ ๋ ๊ณต๋ฐฑ 1๊ฐ๋ฅผ words๋ก => join() - ๋ฌธ์๋ฐฐ์ด์ ๋ฌธ์์ด๋ก ๋ฆฌํด ๐ TIL ์ฝ๋๋ฅผ ์ด๊ฒ์ ๊ฒ ๋ง์ด ์ผ๋๋ฐ ๋จ ๋ ์ค๋ก ๋๋ ์ ์๋ ๊ฒ์ด ํ๋ฌดํ์ง๋ง ์ฝ๋๋ฅผ ๊ฐ์ (?)ํ๋ ๋ฐฉ๋ฒ์ ์์๋ค๊ณ ์๊ฐํ๊ธฐ๋ก,,, ๐ฉ๐ปโ๐ป ์ฝ๋ String[] words = str.split(" "); return String.join(" ", words);
โ๐ป Description 2์ฐจ์ ๋ฐฐ์ด์ ์ ๋ ฅ๋ฐ์ ๊ฐ ๋ฐฐ์ด๋ก ๋ง๋ HashMap ๋ฆฌํด ์ ์ถ๋ ฅ ์์ String[][] arr = new String[]{ {'make', 'Ford'}, {'model', 'Mustang'}, {'year', '1964'}, {'make', 'Bill'}, }; HashMap output = convertListToObject(arr); System.out.println(output) { "make" = "Ford" "model" = "Mustang", "year" = "1964" } ๐ Flow 1. ํด์๋งต ์์ฑ ๋ฐ ์ด๊ธฐํ 2. ๋น ๋ฐฐ์ด์ ๋น HashMap ๋ฆฌํด 3. 2์ฐจ์ ๋ฐฐ์ด์ ์ํํ๋ฉด์ - ์ค๋ณตํค == ์ด๊ธฐ๊ฐ => put 4. 2์ฐจ์๋ฐฐ์ด์ ํด์๋งต์ผ๋ก ... ์ ....
โ๐ป Description ๋ฌธ์์ด์ ์ ๋ ฅ๋ฐ์ ๋ฌธ์์ด์ ๊ตฌ์ฑํ๋ ๊ฐ ๋จ์ด์ ์ฒซ ๊ธ์๊ฐ ๋๋ฌธ์์ธ ๋ฌธ์์ด ๋ฆฌํด ๐ Flow 1. ๋ฌธ์์ด๋ก ์ด๋ฃจ์ด์ง ๋จ์ด๋ฅผ์ ๋๋ฆฌ๋ฉด์ ๋ด์์ค ๋ฐฐ์ด ๋ง๋ค๊ธฐ - ๋จ์ด ๊ณต๋ฐฑ์ผ๋ก ๊ตฌ๋ถ => .split(); 2. ๊ฒฐ๊ณผ๊ฐ ๋ด์ ๋ณ์ ๋ง๋ค๊ธฐ 3. ๋จ์ด ์ํ => for - String.valueOf(), substring() 4. ๊ฐ ๋จ์ด ์ฒซ๊ธ์ ๋๋ฌธ์ => .toUpperCase() 5. ๋ฌธ์์ด join 5. ๋ฌธ์์ด ๋ฆฌํด ๐คฏ Difficulty ๋ฌธ์์ด์ ์ฝ์ด์ค๋ ๊ฒ ๊ณต๋ฐฑ์ผ๋ก ๊ตฌ๋ถ๋ ๋จ์ด ์์ ๋๋ฌธ์๋ก ๋ง๋๋ ๊ฒ ๐ช Attempt ๋จ์ด ๊ตฌ๋ถ โ for๋ฌธ์์ ๋ฌธ์์ด ๋ฐ๋ณต โ ์ฒซ ๊ธ์ ๋๋ฌธ์ splitํ ๋ฌธ์์ด join ๐ TIL split() ๋ฆฌํด: ๋ฌธ์์ด โ ๋ฌธ์์ด ๋ฐฐ์ด Parameters..