Contents
Chapter 7 · Data Structure and AlgorithmPractice

LEARN WITH HARU

Video Lesson တွေက Haru အတန်းသားတွေအတွက်ပါ

Haru ရဲ့ ITPEC FE Full Course မှာ ယခု သင်ခန်းစာတွေကို တစ်ခုချင်း တစ်ကြောင်းချင်း အသေးစိတ်ရှင််ရှင်းပြထားပါတယ်

အခြေခံ မရှိတဲ့ ကျောင်းသားများစွာဟာလည်း ဒီ Course နဲ့ ပဲ အောင်မြင်ကုန်ကြပါပြီ

အတန်းမအပ်သေးပဲ Haru ဆီမှာ အစမ်းသင်ကြည့်ချင်ပါသလား?

သင်တန်းသားတွေရဲ့ စကားသံများ

သင်တန်းသားတွေရဲ့ စကားသံများ

Highlighted text? Practice this concept. Highlighted passages and figures open related questions.

Practice related questions (2)Progress & bookmarks

Current section

2-5 Algorithm Design

p. 443

Practice this section 2 linked exam questions with default filters

Progress

Not marked complete

Related questions in this lesson 3

Recursive calls and terminating cases2Decision-table conditions and actions1
Progress and bookmarks

p. 443 · PDF 453

2 - 5 Algorithm Design

Algorithm design refers to conducting problem analysis and creating an algorithm. In problem analysis, type and data structure of input data/output data, relation between data items are defined, and complex process conditions are summarized in a decision table, or other method.

Original Algorithm Design layout, PDF 453; original source comparison.
Enlarge original visual
Original source text
• Decision table 
A decision table summarizes an action or process according to conditions in a table
form.
Condition
Condition input
It is raining
Y
N
N
title field
field (Y/N/−)
Probability of rain is 30% or more
−
Y
N
Carry long umbrella
X
−
−
Action title
Action input
Carry folding umbrella
−
X
−
field
field (X/−)
Do not carry umbrella
−
−
X
Source visual description

Original Algorithm Design source layout. Source labels: • Decision table; A decision table summarizes an action or process according to conditions in a table; form.; Condition; title field.

Decision-table conditions and actions · 1 practice questions

For creating an algorithm, when the problem is large and complex, the divide-and-conquer approach is also used that splits the problems into smaller problems, and then, each of the smaller problems is solved. When the divide-and-conquer approach is used, the algorithm

p. 444 · PDF 454

becomes recursive in most of the cases (e.g., quick sort). For example, when the algorithm in Figure 7-32, which determines factorial of 1 through N (N > 2), is prepared on the basis of the concept of the divide-and-conquer approach (with a focus on what to do with respect to N), it becomes recursive as shown in Figure 7-33.

Figure 7-32  Determining factorial (1) / Figure 7-33  Determining factorial (2); original source comparison.
Enlarge original visual
Original source text
Figure 7-33  Determining factorial (2)
Figure 7-32 Determining factorial (1)
Source visual description

The original Factorial(N) drawings show loop-based multiplication and the recursive Factorial(N minus one) call side by side.

Recursive calls and terminating cases · 2 practice questions

In addition, the algorithm in the figure above can also be represented by using pseudo-language.

Original Algorithm Design layout, PDF 454; original source comparison.
Enlarge original visual
Source visual description

Original Algorithm Design source layout. Source labels: .

Original chapter exercises

Original chapter exercises →

New FE Textbook Vol.1 · IT Fundamentals · First Edition, April 2015