- Backend engineer
- Junior
- 22 min
Independent parcel slices
Return a new slice with delta added to every value. The caller must keep its original values. Keep duplicates and order. Empty input returns an empty result.
Skills and rubricIndependent parcel slices
- A slice header refers to backing storage. Appending the elements into a fresh empty slice separates this result from the caller before any write.
- An empty input has length zero. For [3,0,3] and delta 4, the result is [7,4,7] while the original remains [3,0,3].
- Trace a concrete input and compare its expected result with the actual result.