Definition at line 5 of file main.cpp.
◆ containsDuplicate()
| bool Solution::containsDuplicate |
( |
vector< int > & |
nums | ) |
|
|
inline |
Definition at line 8 of file main.cpp.
9 {
10 sort(nums.begin(), nums.end());
11 for (int i = 1; i < (int)nums.size(); ++i)
12 if (nums[i - 1] == nums[i])
13 return true;
14 return false;
15 }
Referenced by main().
The documentation for this class was generated from the following file: