50. Scan Memory for Three Consecutive Increasing Values
You are given a block of memory (as an integer array) of size n.
Your task is to write a function that scans the memory using pointers and detects the first occurrence of three consecutive increasing integers — for example: [4, 5, 6] or [10, 11, 12].
Return the starting index of the first such pattern. If no such pattern is found, return -1.You must use pointer logic only, not array indexing.