Input: arr[] = [1, 4, 7, 6, 8, 10, 12]
Output: [6, 8, 10, 12]
Explanation: The longest increasing subarray of composite numbers in the given array is [6, 8, 10, 12], which consists of the composite numbers 6, 8, 10, and 12. The subarray starts at index 3 (6) and ends at index 6 (12).
Input: arr[] = [10, 15, 23, 9, 27, 30, 45, 21, 8, 12]
Output: [9, 27, 30, 45]
Explanation: The longest increasing subarray of composite numbers in the given array is [9, 27, 30, 45, 21], which consists of the composite numbers 9, 27, 21, 30, and 45. The subarray starts at index 3 (9) and ends at index 6 (45).