confusion regarding append() function in go Me and my friend were solving permutation question on leetcode and we came up with this below answer