Save
Computing
SDD
Standard algorithm
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Lisa
Visit profile
Cards (51)
What are the four standard algorithms that you need to learn?
Find Maximum
,
Find Minimum
,
Count Occurrences
,
Linear Search
View source
What is the purpose of the Find Maximum algorithm?
It identifies the
largest
number
in an
array
of
values.
View source
What does the Find Minimum algorithm do?
It identifies the
smallest
number
in an
array
of
values.
View source
What is the function of the Count Occurrences algorithm?
It identifies the number of times a
target value
appears in an
array
of values.
View source
What does the Linear Search algorithm accomplish?
It identifies the position of a
target value
in an array of values.
View source
What value would Find Maximum return if used on the Ages array?
16
View source
What are the steps to implement the Find Maximum algorithm using arrays?
SET
max
TO
ages
[0]
FOR
counter FROM 1 TO 4 DO
IF ages[counter] > max THEN
SET max TO ages[counter]
END IF
END FOR
SEND
"The highest age is " & max TO DISPLAY
View source
What is the first step in the Find Minimum algorithm using arrays?
SET
min
TO
ages
[0]
View source
What are the steps to implement the Find Minimum algorithm using arrays?
SET min TO ages[0]
FOR
counter FROM 1 TO 4 DO
IF ages[counter] < min THEN
SET min TO ages[counter]
END IF
END FOR
SEND
"The lowest age is " & min TO
DISPLAY
View source
What value would Find Minimum return if used on the Ages array?
7
View source
What are the steps to implement the Find Minimum algorithm using record structures?
SET
min
TO UserDetails[0].ages
FOR
counter FROM 1 TO 4 DO
IF UserDetails[counter].ages < min THEN
SET min TO UserDetails[counter].ages
END IF
END FOR
SEND
"The lowest age is " & min TO
DISPLAY
View source
What is the purpose of the Count Occurrences algorithm?
To identify how many times a particular value appears in an
array
.
View source
What are the steps to implement the Count Occurrences algorithm using arrays?
RECEIVE
target
FROM KEYBOARD
SET
numFound
TO 0
FOR
counter FROM 0 TO 4 DO
IF names[counter] = target THEN
SET numFound TO numFound + 1
END IF
END FOR
SEND
"The number found is " & numFound TO
DISPLAY
View source
What would
Count Occurrences
return if used on the Names
array
for the name "
Betty
"?
2
View source
What are the steps to implement the Count Occurrences algorithm using record structures?
RECEIVE
target
FROM
KEYBOARD
SET
numFound
TO
0
FOR
counter FROM 0 TO
4
DO
IF
UserDetails[counter].names = target THEN
SET numFound TO numFound + 1
END IF
END FOR
SEND
"The number found is " & numFound TO
DISPLAY
View source
What is the purpose of the
Linear
Search
algorithm
?
To identify whether or not an item is in a list and which position it occupies.
View source
What are the steps to implement the Linear Search algorithm using arrays?
RECEIVE
target
FROM KEYBOARD
SET
found
TO
FALSE
SET
position
TO 0
FOR
counter FROM 0 TO 4
DO
IF
names[counter] = target
THEN
SET found TO
TRUE
SET position TO counter
END IF
END FOR
10. IF found = TRUE THEN
11. SEND "Found at position " & position TO DISPLAY
12.
ELSE
13. SEND "Not found"
14. END IF
View source
What would
Linear
Search
return if used on the Names array for the name "
Betty
"?
3
View source
What are the steps to implement the Linear Search algorithm using record structures?
RECEIVE
target
FROM KEYBOARD
SET
found
TO FALSE
SET
position
TO 0
FOR
counter
FROM 0 TO 4
DO
IF
UserDetails[counter].names = target
THEN
SET found TO TRUE
SET position TO counter
END IF
END FOR
10. IF found = TRUE THEN
11.
SEND
"Found at position " & position TO
DISPLAY
12.
ELSE
13. SEND "Not found"
14. END IF
View source
What is the maximum number of entries in the examples provided for user input?
10
View source
What is the output message for the Find Maximum algorithm?
"The largest number in the list is " &
max
View source
What is the output message for the Find Minimum algorithm?
"The smallest number in the list is " & min
View source
What is the output message for the Count Occurrences algorithm?
"The name " & target & " appears " & counter & " times"
View source
What is the output message for the Linear Search algorithm?
"
Item
was
found
at
position
" &
position
View source
What is the output message if the item is not found in the Linear Search algorithm?
"Item was not found"
View source
What is the data structure used in the examples for user details?
RECORD
UserDetails
IS {
STRING
Firstname, STRING Surname,
INTEGER
Age, STRING House}
View source
What is the data type of the Age field in the UserDetails record structure?
INTEGER
View source
What is the data type of the Firstname field in the UserDetails record structure?
STRING
View source
What is the data type of the Surname field in the UserDetails record structure?
STRING
View source
What is the data type of the House field in the UserDetails record structure?
STRING
View source
What is the purpose of the InputBox function in the examples?
It prompts the user to enter a value.
View source
What is the purpose of the ListBox1.Items.Add function in the examples?
It
adds
the
entered
value to a
list
box
for
display.
View source
What is the purpose of the MsgBox function in the examples?
It
displays
a
message
box
with
information
to
the
user.
View source
What is the significance of the counter variable in the algorithms?
It is used to iterate through the elements of the
array
or
record structure
.
View source
What does the term "initialise" mean in the context of the algorithms?
It means to set a
variable
to a starting value.
View source
What does the term "SET" indicate in the algorithms?
It indicates assigning a value to a
variable
.
View source
What does the term "SEND" indicate in the algorithms?
It
indicates
displaying
a
message
to
the
user.
View source
What does the term "RECEIVE" indicate in the algorithms?
It indicates getting
input
from the user.
View source
What does the term "FOR" indicate in the algorithms?
It indicates the start of a
loop
that iterates a
specific
number of times.
View source
What does the term "END" indicate in the algorithms?
It indicates the conclusion of a
loop
or
conditional statement
.
View source
See all 51 cards
See similar decks
2.3.2 Standard algorithms
OCR A-Level Computer Science > 2.3 Algorithms to solve problems and standard algorithms
158 cards
1.2.9 Understanding standard algorithms:
Edexcel GCSE Computer Science > Topic 1: Computational Thinking > 1.2 Algorithms
118 cards
2.3 Algorithms to solve problems and standard algorithms
OCR A-Level Computer Science
292 cards
Understanding the following standard searching algorithms
OCR GCSE Computer Science > 2.1 Algorithms > 2.1.3 Searching and Sorting Algorithms
20 cards
a. Sorting algorithms:
Edexcel GCSE Computer Science > Topic 1: Computational Thinking > 1.2 Algorithms > 1.2.9 Understanding standard algorithms:
73 cards
b. Searching algorithms:
Edexcel GCSE Computer Science > Topic 1: Computational Thinking > 1.2 Algorithms > 1.2.9 Understanding standard algorithms:
45 cards
Understanding the following standard sorting algorithms
OCR GCSE Computer Science > 2.1 Algorithms > 2.1.3 Searching and Sorting Algorithms
39 cards
1.4.3 Algorithms
OCR A-Level Computer Science > 1.4 Data types, data structures and algorithms
39 cards
2. Algorithms
OCR A-Level Further Mathematics > Optional Papers > Discrete Mathematics
120 cards
2.3.1 Analysis and design of algorithms
OCR A-Level Computer Science > 2.3 Algorithms to solve problems and standard algorithms
134 cards
2.1 Algorithms
OCR GCSE Computer Science
207 cards
5.3 Algorithms
AQA A-Level Further Mathematics > Optional Application 3 – Discrete Mathematics
44 cards
13.2.1 Creating algorithms
AQA A-Level Computer Science > 13.0 Systematic approach to problem solving > 13.2 Design
135 cards
3.1.3 Searching algorithms
AQA GCSE Computer Science > 3.1 Fundamentals of algorithms
25 cards
1.2 Algorithms
Edexcel GCSE Computer Science > Topic 1: Computational Thinking
857 cards
3.4 Using Spoken Standard English
OCR GCSE English Language > 3. Spoken Language
92 cards
3.1.4 Sorting algorithms
AQA GCSE Computer Science > 3.1 Fundamentals of algorithms
114 cards
3.1 Algorithm Development
AP Computer Science Principles > Big Idea 3: Algorithms and Programming
67 cards
2.2.3 Algorithm design
OCR A-Level Computer Science > 2.2 Problem-solving and programming
112 cards
5.4.1 Standard electrode potentials
OCR A-Level Chemistry > Module 5: Physical Chemistry and Transition Elements > 5.4 Redox and Electrode Potentials
48 cards
1.5.1 Computing-related legislation
OCR A-Level Computer Science > 1.5 Legal, moral, cultural and ethical issues
48 cards