1/50
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Array
a collection of items stored at contiguous memory locations; each item can be accessed using an index
Binary Search
a search algorithm that finds the position of a target value within a sorted array by repeatedly dividing the search interval in half
Bubble Sort
a simple sorting algorithm that repeatedly steps through a list, compares adjacent elements, and swaps them if they are in the wrong order
Concrete Step
a detailed action in an algorithm that specifies exactly how to perform a task
count-controlled loop
a loop that repeats a specific number of times; controlled by a counter variable (e.g., "for" loop)
desk checking
a manual method of reviewing the logic of a program or algorithm using a pencil and paper instead of a computer
event-controlled loop
a loop that continues to execute until a specific condition or event occurs, such as user input or a sensor reading
heterogeneous
a term describing a collection of items that are of different types
homogenous
a term describing a collection of items that are all of the same type
index
a numerical representation of an element's position within an array or list
insertion sort
a sorting algorithm that builds the final sorted array one item at a time by inserting each new item into its correct position
processing
the act of performing operations on data according to a set of instructions to achieve a desired result
record
a composite variable that can store multiple fields of different data types, usually related to a single entity
searching
the process of finding a specific item or value within a collection of data
selection sort
a simple sorting algorithm that repeatedly finds the minimum element from the unsorted part of a list and moves it to the beginning
sequential search (linear search)
a search algorithm that checks each element in a list one by one until the desired element is found or the list ends
sorting
the process of arranging data in a particular order, such as ascending or descending
string
a sequence of characters treated as a single data item; commonly used to represent text
Which statement describes an array?
A collection of elements of the same type stored at contiguous memory locations
Which statement describes a record in programming?
A data structure that holds multiple values of different data types
Which data structure is best suited for storing a collection of different data types?
Record, which are designed to store multiple values of different data types
What is a common characteristic of both arrays and records?
Both can store multiple values
What is the primary advantage of binary search over sequential (linear) search?
It is faster for large datasets because it divides the search interval in half each time it searches
Which search algorithm would you use on an unsorted list?
Sequential (linear) search, which can be used on unsorted lists
Which sorting algorithm repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order?
Bubble sort, which compares and swaps adjacent elements
Which statement describes linear search?
It checks each element one by one
Which statement is true about binary search?
It requires the list to be sorted
Which type of sorting algorithm repeatedly finds the minimum element and moves it to the beginning of the list?
Selection sort
end-structure statement
a statement that marks the end of a block of code, such as the end of a loop or an if statement
block
a group of statements that are executed together, typically enclosed in curly braces or defined by indentation
dual-alternative if
an if statement that provides two paths: one for when the condition is true and another for when it is false (also known as if-else)
loop structure
a way to repeat a block of code multiple times based on a condition, such as for loops or while loops
loop body
the set of statements inside a loop that are executed each time the loop runs
nesting structures
placing one control structure, such as a loop or an if statement, inside another
null case
a situation in which no action is taken, often used as the default case in a switch statement or when no conditions in an if statement are met
selection structure
a control structure that chooses different paths of execution based on conditions, such as if statements or switch cases
sequence structure
the simplest control structure where actions are performed one after another in order
single-alternative if
an if statement that provides only one path of execution if the condition is true; no action is taken if the condition is false
stacking structures
placing one control structure after another in sequence
structure
an organized way to control the flow of a program, such as sequences, selections, and loops
while loop
a loop that repeats a block of code as long as a specified condition is true
Which statement describes a sequence structure in pseudocode?
Executing actions one after another in order
What is the purpose of a selection structure in pseudocode?
To choose different paths based on conditions
Which statement is an example of a dual-alternative if statement?
if (condition) then . . . else, a dual-alternative if statement provides two paths: one if the condition is true and another if it is false.
Which keyword is typically used to represent the end of a selection structure in pseudocode?
End if, is commonly used to denote the end of a selection structure.
Which statement best describes a loop structure in pseudocode?
Repeating a set of actions until a condition is met
What is the primary purpose of a loop body in pseudocode?
To contain the statements repeated in a loop
Which keyword is typically used to start a while loop in pseudocode?
While
Which statement describes a nested structure?
Contains another structure within it
What is the main advantage of using a nesting structure in pseudocode?
It allows for more complex decision-making and iterations.
Which pseudocode statement is an example of a single-alternative if statement?
if (condition) then, a single-alternative if statement provides one path of execution if the condition is true