Pattern Recognition CS Thinking Example 1
Follow the full solution, then compare it with the other examples linked below.
Example 1
easyLook at the sequence: 2, 6, 18, 54, ... Identify the pattern and predict the next number.
Solution
- 1 Step 1: Check differences: 6โ2=4, 18โ6=12, 54โ18=36. The differences are not constant.
- 2 Step 2: Check ratios: 6/2=3, 18/6=3, 54/18=3. Each term is multiplied by 3.
- 3 Step 3: Next number: .
Answer
. The pattern is multiplying by 3.
Pattern recognition involves identifying regularities and trends. Recognising that a sequence multiplies by a constant factor (geometric sequence) lets us predict future values.
About Pattern Recognition
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.
Learn more about Pattern Recognition โMore Pattern Recognition Examples
Example 2 medium
Three programs are described: (a) calculates total price of items in a shopping cart, (b) calculates
Example 3 easyIdentify the pattern: Monday โ M, Tuesday โ T, Wednesday โ W. How would you extract the first letter
Example 4 mediumThree tasks all require counting items that meet a condition: counting even numbers in a list, count