Oracle interview question

2 problems related to string manipulation