Company: oracle_8sep
Difficulty: medium
Bullish Trend Detection Problem Description You are building a backend service for a stock analytics platform. You need to identify bullish trends, which means intervals where the price of the stock is in the P-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: stockPrices : an array of stock prices for n months k : an integer analysis parameter The function should return an integer, the number of bullish trends of size k . Note: If the trend length is 1, each subarray of length 1 is highly profitable. The function signature is: int calculateBullishTrends(int stockPrices_count, int* stockPrices, int k) Examples Example 1: Input: 6 1 2 3 4 5 3 Output: 2 Explanation: These are the intervals of 3 months in which the stock prices are strictly increasing: Months 1 to 3: [1,