A company is planning to bucketize its data to improve the search operation. asked in wipro feb 2022

A company is planning to bucketize its data to improve the search operation. The data is a sequence of digits [0-9]. The bucket ID is calculated as the sum of all the prime digits in the data. The prime number is a number that is divisible only by itself and 1. Write an algorithm to find the bucket ID for the data as the sum of all prime digits in the data. Input The input consists of an integer data, representing the data. Output Print an integer representing the bucket ID for the date as the sum of all prime digits.



Comments

Popular posts from this blog

EV Minimize Array Cost asked in Infosys- march 2022 (available in c++ only)

Chomsky's hierarchy Explanation :

Given an array A, find the size of the smallest subarray asked in MountainBlue, 2022