Assigning a slice copies its descriptor, not its backing array. Two slices may therefore see each other's writes. Appending can either reuse that array or allocate another one depending on capacity, so a function must not rely on one outcome unless it controls the storage. A clear ownership contract avoids surprises: this function returns an independent copy, that function updates the provided storage, and another one may safely return a view. The exercises here require independent outputs. They check behavior after a caller edits a returned value, because comparing the values once would miss aliasing. A copied outer slice of slices is still shallow; copy each row when the caller needs a separate grid. Empty inputs should remain usable results.
Keep every value.