medium, accpeted. 逻辑上one pass,
但是细节上help函数漏掉self了