An e-commerce store's daily sales are stored in the form of a string S tagged 'a-z' or 'A-Z in the company's database online. asked in wipro feb 2022

 An e-commerce store's daily sales are stored in the form of a string S tagged 'a-z' or 'A-Z in the company's database online. Each character in the string represents the product code. The ascii value of the product code represents the sale count of that product. The company wishes to find out the total sale count of N desired products. The total sale count of desired products is the sum of ascii values of occurrence of all the desired products in the string S. If a particular product occurs k times in the string then its ascii value is added k times while calculating the total sale count. ,Write an algorithm to help the company find out the total sale count of the desired N products.



Comments

Popular posts from this blog

PERFECT SQUARE asked by MountainBlue

Harry and Porter asked in MountainBlue ,2022

Chomsky's hierarchy Explanation :