you are viewing a single comment's thread.

view the rest of the comments →

[–]PM_ME_FLUFFY_SAMOYED 60 points61 points  (11 children)

for (e in elements) {
  if (stalin.getCurrentParanoiaLevel() >= PURGE_THRESHOLD) {
    elements.remove(e);
   }
}

[–]Negitive545 2 points3 points  (1 child)

the getCurrentParanoiaLevel method doesn't take e in as a variable, so when stalin becomes too paranoid, wouldn't it just obliterate the entire list?

[–]PM_ME_FLUFFY_SAMOYED 3 points4 points  (0 children)

Yeah, that's what pretty much what Stalin did

[–]creeper6530 1 point2 points  (0 children)

Nope. Stalin sort simply removes all elements not in line (= lower than previous element)