Practice Pattern Recognition in CS Thinking

Use these practice problems to test your method after reviewing the concept explanation and worked examples.

Quick Recap

Pattern recognition is the process of identifying similarities, trends, or regularities across data or problems in order to build general solutions. By spotting what is the same across different cases, you can create reusable strategies instead of solving each case from scratch.

Spotting what's the same across different examples so you can apply one solution to many.

Showing a random 20 of 50 problems.

Example 1

easy
Which shapes share a pattern: a red circle, a red square, a red triangle? What is the same?

Example 2

easy
Look at the sequence: 2, 6, 18, 54, ... Identify the pattern and predict the next number.

Example 3

medium
The differences of 2, 5, 10, 17 are 3, 5, 7. What is the next term?

Example 4

easy
Next term: 1, 4, 9, 16, ___ (hint: squares).

Example 5

medium
Three programs (sum a column, average a column, find max in a column) share what structural pattern?

Example 6

easy
A login fails at 2am, 2am, and 2am on three days. What pattern should you flag?

Example 7

medium
A list of test scores is 88, 90, 89, 91, 90. A new score is 250. What pattern-based judgment should you make about 250?

Example 8

challenge
Correlation vs causation: midweek ice-cream sales and midweek drownings both spike. Why is it WRONG to conclude ice cream causes drowning?

Example 9

hard
A pattern holds for n=1, 2, 3, 4 but fails at n=5. What lesson does this illustrate?

Example 10

medium
Find the rule for 1, 3, 9, 27 and give the next term.

Example 11

hard
In the sequence 2, 12, 36, 80, 150, ..., recognize a polynomial pattern. Each term is n2(n+1)n^2(n+1). What is the 6th term?

Example 12

easy
What comes next in 7, 14, 21, 28, ___?

Example 13

medium
A pattern is observed in 3 examples. Why is that NOT yet a proof?

Example 14

easy
Identifying similarities across different problems so one solution can be reused is called ___.

Example 15

medium
Two tasks: (a) counting vowels in a string; (b) counting odd numbers in a list. What shared algorithm pattern do they use?

Example 16

medium
Three programs are described: (a) calculates total price of items in a shopping cart, (b) calculates total marks of a student across subjects, (c) calculates total rainfall over a week. What pattern do they share?

Example 17

medium
Spot the pattern in the function table: f(1)=2, f(2)=4, f(3)=8, f(4)=16. What is f(5)?

Example 18

easy
Identify the pattern: Monday โ†’ M, Tuesday โ†’ T, Wednesday โ†’ W. How would you extract the first letter of any day?

Example 19

medium
Find the next term in 2, 6, 18, 54, ___.

Example 20

medium
A server crashes at exactly 03:00 on Monday, Wednesday, and Friday. What pattern should you flag, and what hypothesis follows?