結果 : explain algorithm with suitable example