Find if array is in increasing order or decreasing order in python - Manoj Jha

Manoj Jha

Robotic Process Automation, Abbyy Flexicapture, Python, JavaScript, C#. Machine learning and Data Science

Find if array is in increasing order or decreasing order in python

Share This
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



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

If the post was helpful to you, Please donate us so we can create more useful content

Support by Donate

Pages