Update sortresult.cpp

Adding previous result API.