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.
It is not clear why input
10 7
0 2
1 8
1 4
2 8
2 6
3 5
6 9
should give the answer 23.
We have 2 groups: {0 1 2 4 6 8 9} and {3 5}. So, it should be 14.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Journey to the Moon
You are viewing a single comment's thread. Return to all comments →
It is not clear why input
10 7
0 2
1 8
1 4
2 8
2 6
3 5
6 9
should give the answer 23. We have 2 groups: {0 1 2 4 6 8 9} and {3 5}. So, it should be 14.