SarthakKeshari / CPP-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 132 forks source link

Maximum length of Bitonic Sequence #381

Closed PrakharRathore123 closed 2 years ago

PrakharRathore123 commented 2 years ago

Enter your question -

Given an array A containing n positive integers, a subarray A[i … j] is bitonic if there is a k with i <= k <= j such that A[i] <= A[i + 1] … = A[k + 1] >= .. A[j – 1] > = A[j]. Calculate the length of the maximum length bitonic subarray. A sequence, sorted in increasing order is considered Bitonic with the decreasing part as empty. Similarly, decreasing order sequence is considered Bitonic with the increasing part as empty.

Enter link to the question(if question belongs to any online platform) -

-

Tags for the question(eg - Array, Basic, Stack, etc.) -

Array , Recursion , Dynamic Programming

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly issue me this problem

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly provide a test case and explaination

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly check

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly add your solution to "Dynamic Programming" folder. Deadline - 09/10/2021