Given an array nums, a bitonic subsequence first strictly increases and then strictly decreases (either part may be empty). Return the length of the longest bitonic subsequence. The input is JSON {nums}.
Input: JSON {nums}.
Output: Integer — the length of the longest bitonic subsequence.
Input: {"nums":[1,11,2,10,4,5,2,1]}
Output: 6
Explanation: [1,2,10,4,2,1] is bitonic.Input: {"nums":[12,11,40,5,3,1]}
Output: 5
Explanation: An optimal bitonic run.Input: {"nums":[1]}
Output: 1
Explanation: Single element.1<=n<=1000