Computer Science, asked by saumyajauhari6478, 10 months ago

Divide the array into two parts such that first part is increasing

Answers

Answered by Anonymous
1

Split the array elements into strictly increasing and decreasing sequence

Given an array of N elements. The task is to split the elements into two arrays say a1[] and a2[] such that one contains strictly increasing elements and the other contains strictly decreasing elements and a1.size() + a2.size() = a.size(). If it is not possible to do so, print -1 or else print both the arrays.

Note: There can be multiple answers and the order of elements needs not to be

PLEASE MAKE ME AS A BRAINLIST ANSWER

Similar questions