shouldn't that comment say n' >= n && i' > i according to the code above?