Pregunta de entrevista de Microsoft

Three Design questions. Two string manipulations problems.