g2o
Public Member Functions | List of all members
Solution Class Reference

Public Member Functions

vector< int > twoSum (vector< int > &nums, int target)
 
int reverse (int x)
 
bool isPalindrome (int x)
 

Detailed Description

Definition at line 27 of file 1.两数之和.cpp.

Member Function Documentation

bool Solution::isPalindrome ( int  x)
inline

Definition at line 43 of file 9.回文数.cpp.

43  {
44  std::stringstream sstr;
45  sstr << x;
46  std::string str = sstr.str();
47  }
int Solution::reverse ( int  x)
inline

Definition at line 42 of file 7.整数反转.cpp.

42  {
43  bool isNegtive;
44  if (x >> 31)
45  isNegtive = true;
46  std::vector<int> nums;
47  while(True)
48  }
vector<int> Solution::twoSum ( vector< int > &  nums,
int  target 
)
inline

Definition at line 29 of file 1.两数之和.cpp.

29  {
30  std::map<int, int> mapNum;
31  for(int i=0; i<nums.size(); i++) {
32  mapNum.insert(std::pair<int, int>(nums[i], i))
33  }
34  }

The documentation for this class was generated from the following files: