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.
- Prepare
- Mathematics
- Fundamentals
- Handshake
- Discussions
Handshake
Handshake
Sort by
recency
|
333 Discussions
|
Please Login in order to post a comment
For Python3 Platform
Mathematics Logic - Using combinations. Here it is nc2 = n*(n-1)/2
I wrote the code from scratch just to get more practiceCode belove or above most likly will give an error.
Coz Test Case will force you to cast answer to int before return
BRO! Its just a simple Combination Formula for C(N, 2) = N! / 2( N - 2)! = N ( N -1 )/2
You nailed it, happy coding 😍
Java 15