Company: sprinklr_13july
Difficulty: medium
Parkour Problem Description Michael Scott just learnt about Parkour and want to reach other end of office parkouring his way on tables. Since he is very unfit for parkouring he cannot jump to higher tables continously so he derived a strategy, during odd numbered jump he will jump to lowest table which is higher than(or equal height to) current table & during even numbered jump he will jump to highest table lower than(or equal height to) current table. Since he want to reach other end of the office he decided to jump only in one direction. You being Pam (Michael Scott's assistant) is trying to figure out all the starting tables such that if he starts "parkouring" from any of these tables, he can reach the other end of the office following above rules. (He can jump 0 times as well). We will refer to them as good tables/indices . You will be given an array containing height of tables, return all the starting table indices. Input: An integer n followed by n space seperated integers in new