How to count triplets of i,j,k such that i < j < k
How to count triplets of i,j,k such that i < j < k Question: I want to know an efficient way of calculating the count of triplets i, j, and k such that i < j < k. I’ve tried using the following code: for i in range(n): for j in range(i + 1, n): …