We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
2 is the size of the upcoming array. 10,4 are the elements of the array.
for each element i in the array, do the following:
1. find the set of prime numbers from 0-i.
2. Find all the subsets from the above set, such that, the sum of those subset is again a prime number.
3. Do step 1&2 for all the numbers in the array.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Project Euler #249: Prime Subset Sums
You are viewing a single comment's thread. Return to all comments →
2 is the size of the upcoming array. 10,4 are the elements of the array.
for each element
i
in the array, do the following: 1. find the set of prime numbers from 0-i. 2. Find all the subsets from the above set, such that, the sum of those subset is again a prime number. 3. Do step 1&2 for all the numbers in the array.