We are given an array[] of size N integers, here the task is to find if the array is in increasing order or in decreasing order using the divide and conquer algorithm.
Design by Manoj Jha
Example:
Input: arr[] = [17,15,13,11,9,7,5,3]
Output = Decreasing
Explanation: First sub-array {17,15,13} is strictly decreasing and the second sub-array {11,9,7,5,3} is also decreasing
We can solve this with the divide and conquer algorithm.
To know more about the divide and conquer algorithm you can check the Divide and Conquer
Comments
Post a Comment