Slice interview question

Standard leetcode and system design questions