Oracle Interview Question

string reverse algo and minimum sum