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.
You can use this formula for possible combinations
ans=nC2-aC2-bC2-cC2-.....
nC2 selecting any two astronauts from all astronauts....and then
(aC2 ,bC2,cC2.....) subtracting combinations which are from the same set.......
here a,b,c...>=2
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 →
You can use this formula for possible combinations ans=nC2-aC2-bC2-cC2-..... nC2 selecting any two astronauts from all astronauts....and then (aC2 ,bC2,cC2.....) subtracting combinations which are from the same set.......
here a,b,c...>=2