Oracle interview question

string reverse algo and minimum sum