Google | GOCC | 2020
Google · Question · Posted Sep 2020
Problem - 1 Your task is to create a string S consisting of lowercase English alphabets. You are given an array of size 26 where A[i] denotes the cost of using the ith alphabet (consider 1 based indexing Find the lexicographically largest string S that can be cleated such that the cost of building the string is exactly W Note The cost of string S is equal to the sum of the cost of the individuals characters present in ...
The full answer & interview discussion are available to premium members.
Log in Create a free account