Maximum length Biotonic Subarray

can you pls tell how to approach this problem

hey @i_am_dekard_shaw, this query is already answered in some other thread please refer to them Maximum length biotonic subarray