Equilend interview question

Data Structures Leetcode Question. Like string manipulation.