Company: Visa_17sep
Difficulty: medium
No Higher Tide Moments Problem Description You are part of the MOSE system in Venice, a critical defense mechanism designed to protect the city from devastating high tides. Your role is to monitor incoming tide data and determine how many moments have no higher tide in the future. With this information, the system can anticipate stability and avoid unnecessary barrier activations. You are given an array of integers tide_levels representing tide levels at regular intervals. Your task is to count how many tide readings do not have any future reading with a higher tide. Return a single integer: the number of such moments. Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(tide_levels.length 2 ) will fit within the execution time limit. Examples Example 1: Input: tide_levels = [130, 140, 120, 150, 110, 160] Output: 1 Explanation: Only the last tide reading 160 has no higher tide after it. Example 2: Input: tide_levels = [10