Algorithm

Algorithm/ํŒŒ์ด์ฌ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ

ํƒ์ƒ‰&์‹œ๋ฎฌ๋ ˆ์ด์…˜(string, 1์ฐจ์›, 2์ฐจ์› ๋ฆฌ์ŠคํŠธ ํƒ์ƒ‰ ) - 6. ๊ฒฉ์žํŒ ์ตœ๋Œ€ํ•ฉ

๋‚˜์˜ ํ’€์ด 2์ฐจ์› ๋ฐฐ์—ด ๋งŒ๋“ค๊ธฐ [[0]*N for i in range(N)] ๊ฐ•์˜ํ’€์ด K์ฐจ์› ๋ฐฐ์—ด ์ž…๋ ฅ๋ฐ›๊ธฐ

Algorithm/ํŒŒ์ด์ฌ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ

ํƒ์ƒ‰&์‹œ๋ฎฌ๋ ˆ์ด์…˜(string, 1์ฐจ์›, 2์ฐจ์› ๋ฆฌ์ŠคํŠธ ํƒ์ƒ‰ ) - 5. ์ˆ˜๋“ค์˜ ํ•ฉ

๋‚˜์˜ ํ’€์ด ๊ฐ•์˜ํ’€์ด ์ด์ค‘ for ๋ฌธ์„ ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜๋ฉด ์‹œ๊ฐ„๋ณต์žก๋„ O(N²) ํฌ์ธํ„ฐ ๋ณ€์ˆ˜ ๋‘๊ฐœ๋ฅผ ์ด์šฉ

Algorithm/ํŒŒ์ด์ฌ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ

ํƒ์ƒ‰&์‹œ๋ฎฌ๋ ˆ์ด์…˜(string, 1์ฐจ์›, 2์ฐจ์› ๋ฆฌ์ŠคํŠธ ํƒ์ƒ‰ ) - 4. ๋‘ ๋ฆฌ์ŠคํŠธ ํ•ฉ์น˜๊ธฐ

๋‚˜์˜ ํ’€์ด ๊ฐ•์˜ ํ’€์ด ์ด๋ฏธ ์ •๋ ฌ๋˜์–ด์žˆ๋Š” ์ •๋ณด๋ฅผ ํ™œ์šฉํ•˜์ž ํฌ์ธํ„ฐ๋ณ€์ˆ˜ p1,p2 ๋ฅผ ์ด์šฉํ•˜์—ฌ ๋น„๊ต ํฌ์ธํ„ฐ๊ฐ’ ๋ณ€๊ฒฝํ•˜์—ฌ ๊ฐ’์ด๋™

Algorithm/ํŒŒ์ด์ฌ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ

ํƒ์ƒ‰&์‹œ๋ฎฌ๋ ˆ์ด์…˜(string, 1์ฐจ์›, 2์ฐจ์› ๋ฆฌ์ŠคํŠธ ํƒ์ƒ‰ ) - 3. ์นด๋“œ ์—ญ๋ฐฐ์น˜

๋‚˜์˜ ํ’€์ด ๊ฐ•์˜ ํ’€์ด ํŒŒ์ด์ฌ์—์„œ ๊ฐ’ ์Šค์™‘ ํ•˜๋Š”๋ฒ• a,b = b,a _ ์–ธ๋”๋ฐ” : ๋ณ€์ˆ˜์— ๊ฐ’์„ ๋Œ€์ž…ํ•˜์ง€์•Š๊ณ  ๋ฐ˜๋ณต

Algorithm/ํŒŒ์ด์ฌ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ

ํƒ์ƒ‰&์‹œ๋ฎฌ๋ ˆ์ด์…˜(string, 1์ฐจ์›, 2์ฐจ์› ๋ฆฌ์ŠคํŠธ ํƒ์ƒ‰ ) - 2. ์ˆซ์ž๋งŒ ์ถ”์ถœ

isdecimal() : ์ฃผ์–ด์ง„ ๋ฌธ์ž์—ด์ด ์ˆซ์ž(0~9)๋กœ ๋˜์–ด์žˆ๋Š”์ง€ ๊ฒ€์‚ฌ isdigit() : ์ˆซ์ž์ฒ˜๋Ÿผ ์ƒ๊ธด ๋ชจ๋“ ๊ธ€์ž , ์ง€์ˆ˜, 3² ๋“ฑ

hello_u
'Algorithm' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (12 Page)