Nagarro interview question

Reverse each word of the string without using an in-built function