ByteDance Interview Question

a string based coding question