BenchSci Interview Question

LC medium string manipulation algorithm question