Fixed error of answer of example and added answer of test cases