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.
think you should divide the 9996x9995 with two. Because the number of ways of choosing a pair between the N sets containg 1 element would be NC2 that would be (N)(N-1)/2 . I hope it clears your doubt.
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 →
think you should divide the 9996x9995 with two. Because the number of ways of choosing a pair between the N sets containg 1 element would be NC2 that would be (N)(N-1)/2 . I hope it clears your doubt.