What is an algorithm?
A: A step-by-step set of instructions to solve a problem or complete a task.
What is computational thinking?
A: A problem-solving approach that includes decomposition, abstraction, pattern recognition, and algorithm design.
What is decomposition?
A: Breaking a complex problem into smaller, more manageable parts.
Why is decomposition useful?
A: It makes problems easier to understand, solve, debug, and maintain.
What is abstraction?
A: Removing unnecessary details to focus on what is important.
Why is abstraction useful?
A: It simplifies problems and helps create general solutions.
What is pattern recognition?
A: Identifying similarities or trends in data or problems to make solutions easier.
What is pseudocode?
A: A simplified, readable version of code that outlines an algorithm without exact syntax.
What are flowcharts used for?
A: To visually represent the steps of an algorithm using symbols like arrows, decisions, and processes.
What does a diamond represent in a flowchart?
A: A decision (YES/NO or TRUE/FALSE).
What does a rectangle represent in a flowchart?
A: A process or instruction.
What does an oval represent in a flowchart?
A: Start or end of the algorithm.
What is a linear search?
A: Checking each item in a list one-by-one until the target is found.
What is a binary search?
A: Repeatedly splitting a sorted list in half to find the target value.
Why is binary search more efficient than linear search?
A: It eliminates half the remaining data with each step (logarithmic time).
What is bubble sort?
A: A sorting algorithm that repeatedly swaps adjacent items if they are in the wrong order.
What is merge sort?
A: A divide-and-conquer algorithm that splits a list into halves, sorts them, then merges them.
Compare bubble sort and merge sort.
A: Bubble sort is simple but slow; merge sort is fast but uses more memory.
What is a trace table?
A: A table used to track variable values during each step of an algorithm.