4 ms·
If you have N nodes and completely connect the nodes, there are O(N^2) edges. This comes from the formula for the sum(1...N). Edit: I’m not sure I interpreted
by tonyarkles 7y ago
If you have N nodes and completely connect the nodes, there are O(N^2) edges. This comes from the formula for the sum(1...N).
Edit: I’m not sure I interpreted the original statement correctly.
- dr_zoidberg 7y agoThat's what I was about to answer. That's where squaring comes from, in this case. However, as others have noted, you could just sort by # of people contacted, since squaring just gives you larger numbers for no benefit in analysis here.