http://leetcode.com/onlinejudge#question_15 solution

1.Not quite clear about where to put line 26, 27;
2.forget to update j/k on line 24, 25;