๋ฐ˜์‘ํ˜•

Data Structures 1

[Data structures] section2: ๋น…์˜ค ํ‘œ๊ธฐ๋ฒ• (Big O Notation)

4. ๋น…์˜ค (BIG O) ์†Œ๊ฐœ Objectives Big O ํ‘œ๊ธฐ๋ฒ•์˜ ํ•„์š”์„ฑ Big O ๊ฐ€ ๋ฌด์—‡์ธ์ง€ Big O ๊ฐ„๋‹จํ•˜๊ฒŒ ํ‘œํ˜„ํ•˜๋Š” ๋ฒ• ์‹œ๊ฐ„ ๋ณต์žก์„ฑ๊ณผ ๊ณต๊ฐ„ ๋ณต์žก์„ฑ ์ •์˜ Big O ํ‘œ๊ธฐ๋ฒ•์„ ์‚ฌ์šฉํ•˜์—ฌ ์—ฌ๋Ÿฌ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ํ‰๊ฐ€ํ•˜๊ธฐ ๋กœ๊ทธ (logarithm)์ด ๋ฌด์—‡์ธ์ง€ What's the idea here? "Write a function that accepts a string input and returns a reversed copy" ์ œ๋Œ€๋กœ ์ž‘๋™ํ•˜๊ธฐ๋งŒ ํ•œ๋‹ค๋ฉด ๊ทธ๊ฒƒ ๋งŒ์œผ๋กœ๋„ ์ถฉ๋ถ„ํ•˜์ง€ ์•Š์€๊ฐ€? Who Cares? ์ฝ”๋“œ์˜ ์„ฑ๋Šฅ์„ ์–˜๊ธฐํ•  ๋•Œ ์ •ํ™•ํ•œ ์ „๋ฌธ ์šฉ์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ ์ ‘๊ทผ๋ฒ•์˜ ์žฅ๋‹จ์ ์„ ์–˜๊ธฐํ• ๋•Œ๋„ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค. ๊ฐ€์žฅ ์ข‹์€ ํ•ด๊ฒฐ์ฑ…์„ ์ฐพ๋Š” ๊ฒƒ์ด ๊ทธ๋ ‡๊ฒŒ ๋ป”ํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค. ํ•œ ํ•ด๊ฒฐ์ฑ…์— ์ •๋ง ์ข‹๊ณ  ๋˜ ํ•˜๋‚˜๋Š”..

๋ฐ˜์‘ํ˜•