結果 : greedy algorithm time complexity