## Rose Garden Google OA 2023 Solution

Rose Garden Google OA 2023 Solution Given an array of roses. roses[i] means rose i will bloom on day roses[i]. Also given an int k, which is the minimum number of adjacent bloom roses required for a bouquet, and an int n, which is the number of bouquets we need. Return the earliest day that we can get n bouquets of roses. Example:Input: roses = … Read more

## Largest Subarray Google OA 2023 Solution

Largest Subarray Google OA 2023 Solution Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. A subarray is a contiguous part of an array. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: [4,-1,2,1] has the largest sum = 6. Example 2: Input: nums = [1] Output: … Read more

## Fill 2D Array Google OA 2023 Solution

Fill 2D Array Google OA 2023 Solution Given a N x N matrix. Fill the integers from 1 to n*n to this matrix that makes the sum of each row, each column and the two diagonals equal. Example 1: Example 2: SOLUTION Program: Fill 2D Array Google OA Solution in Python Back Tracking Method Program: Fill 2D Array Google OA … Read more

## Compare Strings Google OA 2023 Solution

Compare Strings Google OA 2023 Solution One string is strictly smaller than another when the frequency of occurrence of the smallest character in the string is less than the frequency of the smallest character in the string is less than the frequency of occurrence of the smallest character in the comparison string. For example, string … Read more