add reverse array algorithm