Company: Oracle_17oct
Difficulty: medium
Bullish Trend Detection Problem Description You are building a backend service for a stock analytics platform. You have an array stockPrices , where stockPrices[i] is the price of the stock in month i + 1 . A bullish trend of size k is an interval of exactly k consecutive months in which the stock price increases strictly throughout: every month in the interval has a higher price than the month before it. Implement the function calculateBullishTrends(stockPrices, k) , which returns the number of bullish trends of size k . Input Format Read from standard input. n stockPrices[0] stockPrices[1] ... stockPrices[n-1] k The first line contains n , the number of months. Each of the next n lines contains one integer, the stock price of that month, in month order. The last line contains k , the size of a trend. (inferred -- the source frame is fully blurred; the input layout follows the same Oracle task's custom-testing format: n , then the n prices one per line, then k .) Output Format Print a