This project implements a pattern recognition algorithm in C designed to analyze integer arrays. It focuses on identifying Adjacency Correlations based on number parity (Specifically: Even-Even pairs).
The algorithm processes a sequence
- Dataset Initialization: Loads the integer sequence.
-
Linear Traversal: Iterates through the array from index
$0$ to$n-1$ . -
Contextual Check: Evaluates the current element (
$i$ ) against its immediate successor ($i+1$ ). -
Aggregation:
- If the condition is met, the pair is logged.
- A counter increments to track the frequency of occurrences.
Input: {... 20, 60, 45, 42, 23, 24, 26 ...}
- Check
20, 60: Both Even -> Match ✅ - Check
60, 45: Even, Odd -> No Match ❌ - Check
24, 26: Both Even -> Match ✅
- Compile the code:
gcc main.c -o pair_detector
- Run the executable:
./pair_detector
- Output: Displays the identified pairs and the total count.
This repository demonstrates array traversal and neighbor-checking logic in C.