Aspire Systems Interview Question

In TR1 : Prime no within set of intervals In TR2: Reverse the words present in the string