Google Interview Question

Both the questions were on Strings.