Company: Nutanix_17july
Difficulty: medium
Maximize Flower Bouquet Revenue Problem Description Your task is to maximize revenue from flower bouquets in a garden arranged in a row. A flower shop offers two types of bouquets: Type 1: Contains three roses and costs p dollars. Type 2: Contains one cosmos and one rose and costs q dollars. The garden is represented as a binary string where: 0 indicates a rose 1 indicates a cosmos The flowers are grown in a single row. Consider the row as a one-dimensional array where each cell either contains a rose or a cosmos. For example, the image implies an array like 00101011 , where 0 indicates rose, and 1 indicates cosmos. Bouquets must be formed from consecutive flowers in the row. For example, flowers from positions (i, i+1, i+2) can form a bouquet, but not from non-consecutive positions like (i, i+2) . Given a binary string representing the garden row, determine the maximum possible revenue. Not all flowers need to be used. Complete the flowerBouquets function in the editor. The function i