結果 : define time and space complexity of an algorithm with example