Company: BNY round 2_21march
Difficulty: medium
Construct Best String You are given a string array N called LIST and an integer array POINTS and an integer variable named limit. The score for i th string i.e., LIST[i] is POINTS[i]. Your task is to construct a new string ANS using some or all the strings from LIST such that the length of ANS does not exceed the limit. Mentioned below are the conditions to be followed for constructing the new string ANS: The points for using the i th string once in constructing ANS is equal to POINTS[i]. For example: If LIST = {abc, pqrs}, limit = 6, POINTS = {5,9}, then ANS can be "abcabc" because the maximum allowed length (limit) is 6. Points obtained: 5 + 5 = 10, because the points for "abc" = 5, and it is used twice. A string or strings from LIST can be used multiple times for the construction of ANS, and the strings used from LIST can also be overlapping in the string ANS. For example: If LIST = {pack, acknowledge, edged}, ANS can be "packnowledged". Here, "pack", "acknowledge" and "edged" are o