PayPal Interview Question

Theoretical algorithmic question about adding spacing to a string.