際際滷

際際滷Share a Scribd company logo
Geun-Hyung Kim
UMCL @ Dong-Eui University
Introduction to
Algorithm
9 瑚鍵 蟆 襯伎 
貊磯Μ讀覩 (al-Khwarizmi)
豕豐 螻襴讀: BC 300 蟆
企Μ 豕螻旧曙 螻襴讀
螻襴讀
螻襴讀 
any well-defined computational procedure that
takes some value, or set of values as input and
produces some value, or a set of values as output.
a sequence of computational steps which allow to solve a
certain task
覓語襯 願屋蠍  螻 谿
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
25
35
19
60
24
75
56
5 67
31
 譟郁唄
覯  レ 豺企 伎 襷  螳
豺企 覯碁ゼ   れ れ
れ 豺企 譴 豕 螳 谿剰鍵
豕螳 谿剰鍵 螻襴讀
1. 豺企 襯  誤覃伎 豕 螳 蠍一牛願 覦覯
2. 襷讌襷 豺企襯 誤螻 蠏  蟾讌 蠍一牛 豕 螳螻 觜蟲
豺企 譴 豕 螳 谿剰鍵襯 襷豺
谿 
豺企襯  谿襦襦 曙 螳覃 谿城 覦覯
  谿剰鍵
襦 企  譴 谿剰鍵
1. 豺企襯  誤覃伎 谿場朱る 螳 讌 誤
谿 
豺企襯  誤覃 谿城 襯 誤 覦覯
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
襦 企  譴 谿剰鍵
25 谿剰鍵
36 谿剰鍵
45 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
る谿   譴 谿剰鍵
(る谿朱   譴 谿剰鍵)
5 19 24 25 31 56 60 67 7534
67 谿剰鍵 (谿 )
5 19 24 25 31 56 60 67 7534
67 谿剰鍵
5 19 24 25 31 56 60 67 7534
24 谿剰鍵
  谿剰鍵
螻襴讀
(る谿朱   譴 谿剰鍵)
1. 譴螳 豺  豺企  螳 誤  豺企 螳螻 谿場朱
 襯 觜蟲
2. (1) 觜蟲 谿城 螳 豺企 螳覲企 朱 殊曙 豺企
襯 朱 (1)螻 螳 覦覯朱 
3. (1) 觜蟲 谿城 螳 豺企 螳覲企 覃 るジ讓曙 豺企
襯 朱 (1)螻 螳 覦覯朱 
伎 
豺企襯  朱 蟲覿  襷
 蟇一る
蟇一る   朱 蟲燕 覓語
 蟇一る
 蟇一る
1. 蟇一る  ′襯 讌  螳  蠍′  
2. 蟇一る  ′   ′襯 螳螻 (1)  れ 
Greedy 螻襴讀
螳 螻  螳 譬 蟆企 螳 蟆  覦覯
豕 覓語 願屋 覦覯
810  = 500 * 1 + 100 *3 + 10 * 1
 覿 蠏碁Μ蠍
 譟郁唄
蠏碁   豢覦 壱 譬伎 讌 螻
覈 覿 覯襷 讌 豢覦朱 る 覓語
(,   谿襦 覦覓誤企 )
 覿 蠏碁Μ蠍
螻襴讀
1.  1覯  覿 磯 蠏碁れ 7覯 谿
2. 7覯 伎 碁 6覯, 9覯, 10覯. 10覯朱 螳覃 企 讌
覿 蠍 覓語 10覯   
3. 6覯螻 9覯   覿 蠏碁Μ蠍郁 螳
轟  伎 碁襯  轟 朱 る 危伎
譟伎覃  覿 蠏碁Μ蠍 螳
覩碁 谿剰鍵
 譟郁唄
覩碁 豢蟲 谿場 る 覓語
覩碁 谿剰鍵
螻襴讀
 豺 覦レ 螻 覯曙 るジ  螻 豢蟲螳   蟾讌
るジ 覯曙 殊 螻 螻 蟇語 螳.
るジ 覯豺 螻襴讀
1 螳 螳讌    覩語 螳讌  谿城 覦覯
螳讌  讌讌  覲企 覓願螳 所 螳覲.
 語  襯 譴 螳讌  谿城 覓語
螳讌  谿剰鍵
 譟郁唄
螳讌  谿剰鍵
螻襴讀 1
1.  覩語    螳襯  蠍一 
蠍一 
2. 襾語  覩語   螳 語 殊曙  觜蟲
觜蟲  (  ): 1 覯 ~ (n-1) 覯
n 螳
螳讌  谿剰鍵
螻襴讀 2
1.  覩碁ゼ  螳 朱  蟲
2.  螳   語 伎 觜蟲
觜蟲  (  ): 1 覯 ~ n/2 覯
螳讌  谿剰鍵
螻襴讀 3
伎曙 螳讌 
 .	
伎暑 覦 
 	
1.  覩碁ゼ 覦朱  語 讓曙 襴
2. 螳覯殊  覩語 れ 伎 (1) 覯 覦覲 
Divide-and -Conquer (覿 覲)
1. 豌 覓語襯 蠍郁  覿覿 覓語襦 覿
2. 覿覿 覓語襯 蠏朱 願屋 豌 覓語襯 願屋
螳讌  谿剰鍵
螻襴讀 3 覿
 螳: n 螳
1覯讌 觜蟲: n/2 螳
2覯讌 觜蟲: n/4 螳
3覯讌 觜蟲: n/8 螳
4覯讌 觜蟲: n/16 螳
k覯讌 觜蟲: n/2k螳
 螳螳 n 螳   觜蟲 : log2n
 螳螳 2覦磯 讀螳  觜蟲  1 覯 讀螳
   讌 谿剰鍵
 譟郁唄
	 		 		 		 		 		 		 		 		 		 		 		 		 		 		 	
	 		 		 		 		 		 		 		 		 		 		 		 		 		 		 	
	 		 		 		 		 		 		 		 		 		 		 		 		 		 		 	
	 		 		 		 		 		 		 		 		 		 		 		 		 			
 讌 譴  螳  讌  れ 
    襷覃  譯殊  譯曙
譯暑  豕 覃伎    讌襯 谿城 覓語
   讌 谿剰鍵
2螳  讌 蟆曙
蠏 螻襯 伎譯殊 企
 讌螳 2螳  蟆曙
		
 覈 襷 朱 企  讌襯 谿場  
 譯殊  譯曙 or 譟
譯曙: 殊  讌 
譟: るジ  讌
   讌 谿剰鍵
4螳  讌 蟆曙
 讌螳 4螳  蟆曙
		 		
case 1:
case 2:
   讌 谿剰鍵
4螳  讌 蟆曙
 讌螳 4螳  蟆曙
		 		
 譯殊    譯暑 蟆曙:
殊殊    譯暑 蟆曙:
殊殊    覈  蟆曙:
譯曙  襷  讌 
 蟷 襷  讌 
襾語  讌
   讌 谿剰鍵
4螳  讌 蟆曙
01	00	 11	10	
  譟壱朱 襷   蟆曙一 : 22 (4)
1) A, B 覈 襷讌  
(A) (B) (B) (A)
3) B 襷 襷  4) A, B 覈 襷 
2) A 襷 襷 
 讌螳 4螳  蟆曙
   讌 谿剰鍵
8螳  讌 蟆曙
 讌螳 8螳  蟆曙
		 		 		 		
A襷 襷 B襷 襷 C襷 襷A 襷
B 襷 C 襷 B 襷
A 襷
C 襷
A 襷 B 襷
C 襷
 讌螳 n 螳 蟆曙  : 0 ~ log2n
螻襴讀 螻給   螻
https://www.acmicpc.net
https://www.topcoder.com/what-can-you-do/algorithms-analytics/

More Related Content

Featured (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
Artificial Intelligence, Data and Competition SCHREPEL June 2024 OECD dis...
Artificial Intelligence, Data and Competition  SCHREPEL  June 2024 OECD dis...Artificial Intelligence, Data and Competition  SCHREPEL  June 2024 OECD dis...
Artificial Intelligence, Data and Competition SCHREPEL June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report by Hubspot
2024 State of Marketing Report  by Hubspot2024 State of Marketing Report  by Hubspot
2024 State of Marketing Report by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report by Hubspot
2024 State of Marketing Report  by Hubspot2024 State of Marketing Report  by Hubspot
2024 State of Marketing Report by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray

1. introduction to algorithm

  • 1. Geun-Hyung Kim UMCL @ Dong-Eui University Introduction to Algorithm
  • 2. 9 瑚鍵 蟆 襯伎 貊磯Μ讀覩 (al-Khwarizmi) 豕豐 螻襴讀: BC 300 蟆 企Μ 豕螻旧曙 螻襴讀 螻襴讀
  • 3. 螻襴讀 any well-defined computational procedure that takes some value, or set of values as input and produces some value, or a set of values as output. a sequence of computational steps which allow to solve a certain task 覓語襯 願屋蠍 螻 谿
  • 4. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 5. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 6. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 7. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 8. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 9. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 10. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 11. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 12. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 13. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 14. 25 35 19 60 24 75 56 5 67 31 譟郁唄 覯 レ 豺企 伎 襷 螳 豺企 覯碁ゼ れ れ
  • 15. れ 豺企 譴 豕 螳 谿剰鍵 豕螳 谿剰鍵 螻襴讀 1. 豺企 襯 誤覃伎 豕 螳 蠍一牛願 覦覯 2. 襷讌襷 豺企襯 誤螻 蠏 蟾讌 蠍一牛 豕 螳螻 觜蟲 豺企 譴 豕 螳 谿剰鍵襯 襷豺 谿 豺企襯 谿襦襦 曙 螳覃 谿城 覦覯
  • 16. 谿剰鍵 襦 企 譴 谿剰鍵 1. 豺企襯 誤覃伎 谿場朱る 螳 讌 誤 谿 豺企襯 誤覃 谿城 襯 誤 覦覯
  • 17. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 18. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 19. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 20. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 21. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 22. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 23. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 24. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 25. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 26. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 27. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 28. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 29. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 30. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 31. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 32. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 33. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 34. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 35. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 36. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 37. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 38. 谿剰鍵 襦 企 譴 谿剰鍵 25 谿剰鍵 36 谿剰鍵 45 谿剰鍵
  • 39. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 40. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 41. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 42. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 43. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 44. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 45. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 46. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 47. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 48. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 49. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 50. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 51. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 52. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 53. 谿剰鍵 る谿 譴 谿剰鍵 (る谿朱 譴 谿剰鍵) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 (谿 ) 5 19 24 25 31 56 60 67 7534 67 谿剰鍵 5 19 24 25 31 56 60 67 7534 24 谿剰鍵
  • 54. 谿剰鍵 螻襴讀 (る谿朱 譴 谿剰鍵) 1. 譴螳 豺 豺企 螳 誤 豺企 螳螻 谿場朱 襯 觜蟲 2. (1) 觜蟲 谿城 螳 豺企 螳覲企 朱 殊曙 豺企 襯 朱 (1)螻 螳 覦覯朱 3. (1) 觜蟲 谿城 螳 豺企 螳覲企 覃 るジ讓曙 豺企 襯 朱 (1)螻 螳 覦覯朱 伎 豺企襯 朱 蟲覿 襷
  • 55. 蟇一る 蟇一る 朱 蟲燕 覓語
  • 56. 蟇一る 蟇一る 1. 蟇一る ′襯 讌 螳 蠍′ 2. 蟇一る ′ ′襯 螳螻 (1) れ Greedy 螻襴讀 螳 螻 螳 譬 蟆企 螳 蟆 覦覯 豕 覓語 願屋 覦覯 810 = 500 * 1 + 100 *3 + 10 * 1
  • 57. 覿 蠏碁Μ蠍 譟郁唄 蠏碁 豢覦 壱 譬伎 讌 螻 覈 覿 覯襷 讌 豢覦朱 る 覓語 (, 谿襦 覦覓誤企 )
  • 58. 覿 蠏碁Μ蠍 螻襴讀 1. 1覯 覿 磯 蠏碁れ 7覯 谿 2. 7覯 伎 碁 6覯, 9覯, 10覯. 10覯朱 螳覃 企 讌 覿 蠍 覓語 10覯 3. 6覯螻 9覯 覿 蠏碁Μ蠍郁 螳 轟 伎 碁襯 轟 朱 る 危伎 譟伎覃 覿 蠏碁Μ蠍 螳
  • 59. 覩碁 谿剰鍵 譟郁唄 覩碁 豢蟲 谿場 る 覓語
  • 60. 覩碁 谿剰鍵 螻襴讀 豺 覦レ 螻 覯曙 るジ 螻 豢蟲螳 蟾讌 るジ 覯曙 殊 螻 螻 蟇語 螳. るジ 覯豺 螻襴讀
  • 61. 1 螳 螳讌 覩語 螳讌 谿城 覦覯 螳讌 讌讌 覲企 覓願螳 所 螳覲. 語 襯 譴 螳讌 谿城 覓語 螳讌 谿剰鍵 譟郁唄
  • 62. 螳讌 谿剰鍵 螻襴讀 1 1. 覩語 螳襯 蠍一 蠍一 2. 襾語 覩語 螳 語 殊曙 觜蟲 觜蟲 ( ): 1 覯 ~ (n-1) 覯 n 螳
  • 63. 螳讌 谿剰鍵 螻襴讀 2 1. 覩碁ゼ 螳 朱 蟲 2. 螳 語 伎 觜蟲 觜蟲 ( ): 1 覯 ~ n/2 覯
  • 64. 螳讌 谿剰鍵 螻襴讀 3 伎曙 螳讌 . 伎暑 覦 1. 覩碁ゼ 覦朱 語 讓曙 襴 2. 螳覯殊 覩語 れ 伎 (1) 覯 覦覲 Divide-and -Conquer (覿 覲) 1. 豌 覓語襯 蠍郁 覿覿 覓語襦 覿 2. 覿覿 覓語襯 蠏朱 願屋 豌 覓語襯 願屋
  • 65. 螳讌 谿剰鍵 螻襴讀 3 覿 螳: n 螳 1覯讌 觜蟲: n/2 螳 2覯讌 觜蟲: n/4 螳 3覯讌 觜蟲: n/8 螳 4覯讌 觜蟲: n/16 螳 k覯讌 觜蟲: n/2k螳 螳螳 n 螳 觜蟲 : log2n 螳螳 2覦磯 讀螳 觜蟲 1 覯 讀螳
  • 66. 讌 谿剰鍵 譟郁唄 讌 譴 螳 讌 れ 襷覃 譯殊 譯曙 譯暑 豕 覃伎 讌襯 谿城 覓語
  • 67. 讌 谿剰鍵 2螳 讌 蟆曙 蠏 螻襯 伎譯殊 企 讌螳 2螳 蟆曙 覈 襷 朱 企 讌襯 谿場 譯殊 譯曙 or 譟 譯曙: 殊 讌 譟: るジ 讌
  • 68. 讌 谿剰鍵 4螳 讌 蟆曙 讌螳 4螳 蟆曙 case 1: case 2:
  • 69. 讌 谿剰鍵 4螳 讌 蟆曙 讌螳 4螳 蟆曙 譯殊 譯暑 蟆曙: 殊殊 譯暑 蟆曙: 殊殊 覈 蟆曙: 譯曙 襷 讌 蟷 襷 讌 襾語 讌
  • 70. 讌 谿剰鍵 4螳 讌 蟆曙 01 00 11 10 譟壱朱 襷 蟆曙一 : 22 (4) 1) A, B 覈 襷讌 (A) (B) (B) (A) 3) B 襷 襷 4) A, B 覈 襷 2) A 襷 襷 讌螳 4螳 蟆曙
  • 71. 讌 谿剰鍵 8螳 讌 蟆曙 讌螳 8螳 蟆曙 A襷 襷 B襷 襷 C襷 襷A 襷 B 襷 C 襷 B 襷 A 襷 C 襷 A 襷 B 襷 C 襷 讌螳 n 螳 蟆曙 : 0 ~ log2n
  • 72. 螻襴讀 螻給 螻 https://www.acmicpc.net https://www.topcoder.com/what-can-you-do/algorithms-analytics/