ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ๊ฐ€์žฅ ํฐ ์ˆ˜
ยท
Algorithm/ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค
https://school.programmers.co.kr/learn/courses/30/lessons/42746 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”. programmers.co.kr ๋ฌธ์ œ 0 ๋˜๋Š” ์–‘์˜ ์ •์ˆ˜๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, ์ •์ˆ˜๋ฅผ ์ด์–ด ๋ถ™์—ฌ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋Š” ๊ฐ€์žฅ ํฐ ์ˆ˜ ๊ตฌํ•˜๊ธฐ ์ œํ•œ ์‚ฌํ•ญ numbers์˜ ๊ธธ์ด๋Š” 1 ์ด์ƒ 100,000 ์ดํ•˜ numbers์˜ ์›์†Œ๋Š” 0 ์ด์ƒ 1,000 ์ดํ•˜ ์ •๋‹ต์ด ๋„ˆ๋ฌด ํด ์ˆ˜ ์žˆ์œผ๋‹ˆ ๋ฌธ์ž์—ด๋กœ ๋ฐ”๊พธ์–ด return ์ž…์ถœ๋ ฅ ์˜ˆ์‹œ numbers return [6, 10, 2] [3, 30, 34, 5, 9] [3, 30, 34, 5, 9] "9534330"..
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ์ด์ง„ ๋ณ€ํ™˜ ๋ฐ˜๋ณตํ•˜๊ธฐ
ยท
Algorithm/ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค
https://school.programmers.co.kr/learn/courses/30/lessons/70129 ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ์ฝ”๋“œ ์ค‘์‹ฌ์˜ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ. ์Šคํƒ ๊ธฐ๋ฐ˜์˜ ํฌ์ง€์…˜ ๋งค์นญ. ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์˜ ๊ฐœ๋ฐœ์ž ๋งž์ถคํ˜• ํ”„๋กœํ•„์„ ๋“ฑ๋กํ•˜๊ณ , ๋‚˜์™€ ๊ธฐ์ˆ  ๊ถํ•ฉ์ด ์ž˜ ๋งž๋Š” ๊ธฐ์—…๋“ค์„ ๋งค์นญ ๋ฐ›์œผ์„ธ์š”. programmers.co.kr ๋ฌธ์ œ 0๊ณผ 1๋กœ ์ด๋ฃจ์–ด์ง„ ์–ด๋–ค ๋ฌธ์ž์—ด x์— ๋Œ€ํ•œ ์ด์ง„ ๋ณ€ํ™˜ x์˜ ๋ชจ๋“  0์„ ์ œ๊ฑฐ x์˜ ๊ธธ์ด๋ฅผ c๋ผ๊ณ  ํ•˜๋ฉด, x๋ฅผ "c๋ฅผ 2์ง„๋ฒ•์œผ๋กœ ํ‘œํ˜„ํ•œ ๋ฌธ์ž์—ด"๋กœ ๋ฐ”๊พผ๋‹ค. ์˜ˆ์‹œ : x = "0111010" -> "1111" -> "100” s๊ฐ€ "1"์ด ๋  ๋•Œ๊นŒ์ง€ ๊ณ„์†ํ•ด์„œ s์— ์ด์ง„ ๋ณ€ํ™˜์„ ๊ฐ€ํ–ˆ์„ ๋•Œ, ์ด์ง„ ๋ณ€ํ™˜์˜ ํšŸ์ˆ˜์™€ ๋ณ€ํ™˜ ๊ณผ์ •์—์„œ ์ œ๊ฑฐ๋œ ๋ชจ๋“  0์˜ ๊ฐœ์ˆ˜๋ฅผ ๊ฐ๊ฐ ๋ฐฐ์—ด์— ๋‹ด์•„ return ์ œํ•œ์‚ฌํ•ญ s์˜ ๊ธธ์ด๋Š”..
๋ฐฑ์ค€ 2596๋ฒˆ - ๋น„๋ฐ€ํŽธ์ง€
ยท
Algorithm/๋ฐฑ์ค€
https://www.acmicpc.net/problem/2596 2596๋ฒˆ: ๋น„๋ฐ€ํŽธ์ง€ ๋ณ‘ํ˜„์ด๋Š” ์ง€์€์ด์—๊ฒŒ ๋ฌธ์ž A, B, C, D, E, F, G, H ๋กœ ์“ฐ์—ฌ์ง„ ํŽธ์ง€๋ฅผ ๋‚ ๋งˆ๋‹ค ๋ณด๋‚ด๋Š”๋ฐ, ์ปดํ“จํ„ฐ๋กœ ๋ณด๋‚ด๋Š” ๋น„๋ฐ€ํŽธ์ง€๋กœ, ํ•œ ๋ฌธ์ž๋งˆ๋‹ค 0 ๋˜๋Š” 1์ธ ์ˆซ์ž ์—ฌ์„ฏ ๊ฐœ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ณด๋‚ธ๋‹ค. ๋‘˜ ์‚ฌ์ด์˜ ์•ฝ์†์€ ๋‹ค์Œ๊ณผ www.acmicpc.net ์ฒ˜์Œ์— ํ’€์ด๊ฐ€ ์ƒ๊ฐ์ด ๋‚˜์ง€ ์•Š์•˜๋‹ค.. ๊ดœํžˆ ๋ณต์žกํ•˜๊ฒŒ String ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ํ†ตํ•ด ๋ฌธ์ž์—ด ์ผ์น˜๋‚˜ ๋ฌธ์ž์—ด ์ž๋ฅด๊ธฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ•ด๊ฒฐํ•  ์ƒ๊ฐ์„ ํ•˜๋‹ค๋ณด๋‹ˆ ๊ทธ๋Ÿฐ ๊ฒƒ ๊ฐ™๋‹ค. ๋ธŒ๋ก ์ฆˆ ์ฃผ์ œ์— ์•ˆํ’€๋ ค์„œ ์งœ์ฆ์ด ๋‚ฌ์ง€๋งŒ, ๋‹จ์ˆœํ•˜๊ฒŒ ์ƒ๊ฐํ•ด์„œ for๋ฌธ ๋Œ๋ฆฌ๋ฉด์„œ ํ•˜๋‚˜ํ•˜๋‚˜ ๋ชจ๋“  ๊ฒฝ์šฐ๋ฅผ ๋น„๊ตํ•˜๋ฉด ๋  ์ผ์ด์—ˆ๋‹ค! ์šฐ์„  ๊ฐ ๋ฌธ์ž์— ํ•ด๋‹นํ•˜๋Š” ์•”ํ˜ธ๋ฌธ๋“ค์„ String ๋ฐฐ์—ด์œผ๋กœ ์ €์žฅํ–ˆ๋‹ค. 1. ๊ฐ ๋ฌธ์ž๊ฐ€ ์–ด๋–ค ์•ŒํŒŒ๋ฒณ ๋ฌธ..
1213๋ฒˆ - ํŒฐ๋ฆฐ๋“œ๋กฌ ๋งŒ๋“ค๊ธฐ
ยท
Algorithm/๋ฐฑ์ค€
https://www.acmicpc.net/problem/1213
SWEA 1228๋ฒˆ - ์•”ํ˜ธ๋ฌธ1
ยท
Algorithm/SWEA
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14w-rKAHACFAYD&categoryId=AV14w-rKAHACFAYD&categoryType=CODE&problemTitle=%EC%95%94%ED%98%B8%EB%AC%B81&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=&pageSize=10&pageIndex=1 SW Expert Academy SW ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์—ญ๋Ÿ‰ ๊ฐ•ํ™”์— ๋„์›€์ด ๋˜๋Š” ๋‹ค์–‘ํ•œ ํ•™์Šต ์ปจํ…์ธ ๋ฅผ ํ™•์ธํ•˜์„ธ์š”! swexpertacademy.com ์ž…๋ ฅ์ด ํ•œ ์ค„๋กœ ๋˜์–ด์žˆ์–ด์„œ ๋ฌธ์ž์—ด์„ ๋ถ„๋ฆฌํ•˜๊ณ  ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐ ์–ด๋ ค์›€์„ ๊ฒช์—ˆ๋‹ค. ๊ฒจ์šฐ ํ–ˆ์œผ๋‚˜ ๋ชจ๋“  ํ…Œ์ŠคํŠธ ..
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ์˜์–ด ๋๋ง์ž‡๊ธฐ
ยท
Algorithm/ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค
https://programmers.co.kr/learn/courses/30/lessons/12981 ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์—ฐ์Šต - ์˜์–ด ๋๋ง์ž‡๊ธฐ 3 ["tank", "kick", "know", "wheel", "land", "dream", "mother", "robot", "tank"] [3,3] 5 ["hello", "observe", "effect", "take", "either", "recognize", "encourage", "ensure", "establish", "hang", "gather", "refer", "reference", "estimate", "executive"] [0,0] programmers.co.kr ๋ฌธ์ž์—ด์„ ๋‹ค๋ฃจ๋Š” ๋ฌธ์ œ์ด๋‹ค. ๋ฌธ์ž์—ด์—์„œ ๋ฌธ์ž๋ฅผ ๋ฝ‘์•„๋‚ด๊ธฐ ์œ„ํ•ด์„œ str.charAt(i)..
giraffe_
'๋ฌธ์ž์—ด' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก