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