You are viewing a single comment's thread. Return to all comments →
That's brief, but it runs in linear time. You can do it in constant time with (N-1) * N // 2.
Seems like cookies are disabled on this browser, please enable them to open this website
Handshake
You are viewing a single comment's thread. Return to all comments →
That's brief, but it runs in linear time. You can do it in constant time with (N-1) * N // 2.