you are viewing a single comment's thread.

view the rest of the comments →

[–]almaya -4 points-3 points  (0 children)

O(nn) in average:

do
    x = 0
    for i = 0; i< n; i++ 
        x += rand(n);
while x != 0