結果 : most difficult algorithm to understand