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.
The "Between Two Sets" problem on HackerRank is about finding how many integers satisfy two conditions at the same time. First, all the numbers in the first set must divide the integer evenly, and second, the integer must evenly divide all the numbers in the second set. For example, if a = [2, 4] and b = [16, 32, 96], the numbers that meet both conditions are 4, 8, and 16, since both 2 and 4 divide them perfectly, and they also divide 16, 32, and 96 without any remainder. Therefore, the final answer would be 3.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Between Two Sets
You are viewing a single comment's thread. Return to all comments →
The "Between Two Sets" problem on HackerRank is about finding how many integers satisfy two conditions at the same time. First, all the numbers in the first set must divide the integer evenly, and second, the integer must evenly divide all the numbers in the second set. For example, if
a = [2, 4]andb = [16, 32, 96], the numbers that meet both conditions are 4, 8, and 16, since both 2 and 4 divide them perfectly, and they also divide 16, 32, and 96 without any remainder. Therefore, the final answer would be 3.