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.
Putting the required function with different logic:
1. Create a list of reminders for k for each from the given list s.
2. Logic is to identify the sum of reminder's pair to be k
3. Eliminate the reminder with lower count in the created reminder list for each reminder pair.
4. add for the edge condition at i==0 (when only one value can be added such that when added to any other no. the reminder for the sum is not 0 when done with k
5. Add for edge condition when k/2 == i (with the same logic as above)
6. Add the count for each pair of reminders, where the count is the max of the frequency of reminders between the two pairs.
Non-Divisible Subset
You are viewing a single comment's thread. Return to all comments →
Putting the required function with different logic: 1. Create a list of reminders for k for each from the given list s. 2. Logic is to identify the sum of reminder's pair to be k 3. Eliminate the reminder with lower count in the created reminder list for each reminder pair. 4. add for the edge condition at i==0 (when only one value can be added such that when added to any other no. the reminder for the sum is not 0 when done with k 5. Add for edge condition when k/2 == i (with the same logic as above) 6. Add the count for each pair of reminders, where the count is the max of the frequency of reminders between the two pairs.