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.
Non-Divisible Subset
Non-Divisible Subset
Sort by
recency
|
774 Discussions
|
Please Login in order to post a comment
The problem spec states the input consists of distinct integers. The first example is at odds with the problem spec (value 10 repeated).
In problem it is mentioned that the S is distinct,however the next line shows that the given S has duplicate values. (In the provided example, the value 10 is repeated twice). Or did I misunderstood the problem?
Below is the values of S used in the Example.
S = [ 19, 10, 12, 10, 24, 25, 22]
public static int nonDivisibleSubset(int k, List s) { // Write your code here int [] remindercountes = new int [k] ; int count =0 ;