結果 : time and space complexity of beam search algorithm