Searching Algorithms
Sorting Algorithms
Functions
Binary
Programming Fundamentals
100

In Linear Search, how do you find an item in a list?

Go through each item one by one until you find it.

100

Which sorting algorithm finds the smallest item and swaps it to the front?

Selection Sort

100

What is a function in programming?

A set of instructions that does a task when called.

100

What two numbers make up the binary system?

0 and 1

100

What is a loop used for?

Repeating a task multiple times.

200

Why is Binary Search faster than Linear Search?

It divides the list in half each time, so it finds the item faster.

200

What does Insertion Sort do with each new number it sees?

It inserts it into the correct spot in the sorted part.

200

What is the main reason we use functions?

To reuse code and make programs organized.

200

What is the binary number 101 in decimal?

5

200

If a program runs an if statement, what is it checking?

A condition (whether something is true or false).

300

What is a requirement for using Binary Search?

The list must be sorted.

300

If you have a list that is almost sorted, which sorting method would be faster: Selection Sort or Insertion Sort?

Insertion Sort is faster because it moves fewer items.

300

If you call a function named makePizza(), what do you think it does?

It probably makes a pizza by following a set of steps.

300

What is 24 in decimal?

16

300

What is brushing your teeth until a timer stops or walking until you reach school an example of?

A loop.

400

If you have a list of 1,000 items, approximately how many steps does Binary Search take to find something?

About 10 steps (since Binary Search works in log₂N time).

400

Which sorting method goes through the entire list multiple times, picking the smallest item each time?

Selection Sort

400

What is the difference between a function and a loop?

A function runs when you call it, and a loop repeats a task many times.

400

What is the largest number you can store with 4 binary digits?

15 (1111 in binary)

400

What happens if you forget to write a stop condition in a loop?

The loop will run forever and never stop (infinite loop).

500

Which search algorithm would be better for searching a phone book: Linear Search or Binary Search? Explain why.  

Binary Search is better because the phone book is sorted alphabetically, allowing us to divide and conquer instead of checking each entry one by one like Linear Search.

500

Which sorting method is like sorting playing cards in your hand—you pick up one card at a time and put it in the right spot?

Insertion Sort. It sorts by picking up one item at a time and placing it in the correct spot, just like organizing cards in your hand.

500

What happens if you call a function, but it doesn’t exist in the code?

You get an error because the computer doesn’t know what to do.

500

Convert the decimal number 13 into binary.

1101

500

How can you tell if one algorithm is better than another

A better algorithm is usually faster (uses fewer steps) and more efficient (uses less memory or resources).