Company: Nokia_23march
Difficulty: medium
Skyscapers Problem Description Bob loves nature and lives in a lush green area that extends from position 0 to K. However, the government has decided to build N Skyscapers in this area one by one at specific locations. Bob wants to know the longest continuous greenery segment available after each skyscraper is constructed and note down its value. However, Bob is unsure about some of the values. To confirm these answers, he asks you Q queries, where each query asks for the longest continuous greenery segment after the construction of the query[i] th skyscraper. Help Bob get the correct answer. Your task is to process the queries efficiently and return an array where each element represents the longest continuous greenery segment after the corresponding query. Task Return an array where the P th element is the length of the longest continuous greenery segment after the construction of the query[P] th skyscraper. Function description Complete the function solve() provided in the editor. T