Update reverse_method.cpp