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 named stockPrices where stockPrices[i] denotes the price of the stock in the i th month. A bullish trend of size k is an interval of k months such that the stock prices increase strictly throughout those months. Implement a function that calculates the number of bullish trends of size k . The function calculateBullishTrends takes the following inputs: int stockPrices[n] : the stock prices for n months int k : the analysis parameter The function should return an integer, the number of bullish trends of size k . Note: If the interval length is 1, each subarray of length 1 is highly profitable. Examples Example 1: Input: stockPrices = [5, 3, 5, 7, 8], k = 3 Output: 2 Explanation: We need to find intervals of k=3 months where prices strictly increase. For the interval starting at index 0: [5, 3, 5] . Prices are not strictly increasing (5 is not less than 3). For