The sample test case doesn’t give enough details about the question. What does it mean to be "divisible by all numbers from 1 to 9 " .Moreover, how does the output 4 comes in the test case?
Regarding the sample test Case(Divisible Patterns)
For sample test case :
set S is { 1, 2, 3, 4, 5, 6, 7}
Divisible by all means the product oh chosen subset should be divisible by numbers from 1 upto 9
To make a number divisible by all numbers from 1 to 9 product should have 2^3, 3^2, 5, 7 as factors.
Ans is 4 because :
{ 5, 7, 2, 4, 3, 6}
{ 5, 7, 4, 3, 6}
{ 1, 5, 7, 2, 4, 3, 6}
{ 1, 5, 7, 4, 3, 6}
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.