SAP Interview Question

Leetcode easy question (string manipulation)