prashant1146 / Hactober2022

5 stars 35 forks source link

Save Your Life #4

Closed prashant1146 closed 2 years ago

prashant1146 commented 2 years ago

Given a string w, integer array b, character array x and an integer n. n is the size of array b and array x. Find a substring which has the sum of the ASCII values of its every character, as maximum. ASCII values of some characters are redefined. Note: Uppercase & lowercase both will be present in the string w. Array b and Array x contain corresponding redefined ASCII values. For each i, b[i] contain redefined ASCII value of character x[i].

Example 1:

Input: W = abcde N = 1 X[] = { 'c' } B[] = { -1000 } Output: de Explanation: Substring "de" has the maximum sum of ascii value, including c decreases the sum value Example 2:

Input: W = dbfbsdbf N = 2 X[] = { 'b','s' } B[] = { -100, 45 } Output: dbfbsdbf Explanation: Substring "dbfbsdbf" has the maximum sum of ascii value.

palprashant2002 commented 2 years ago

Please assign this issue to me...

KrishKumar3004 commented 2 years ago

Hi there, I want to work on this issue. Please assign it to me.

Pheonix-001 commented 2 years ago

plz assign this issue to me

abhishekiiitbh2903 commented 2 years ago

pls assign this to me , I will solve that