aboutsummaryrefslogtreecommitdiff
path: root/max_points_line.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'max_points_line.cpp')
-rw-r--r--max_points_line.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/max_points_line.cpp b/max_points_line.cpp
index 5f09af7..3e34be4 100644
--- a/max_points_line.cpp
+++ b/max_points_line.cpp
@@ -11,7 +11,7 @@ public:
class Solution {
public:
- int maxPoints(vvd(int) & points) {
+ int maxPoints(vvd & points) {
int n = points.size(), ans = 0;
if (n <= 2) // 2 or less means points are always collinear
return n;
@@ -43,7 +43,7 @@ private:
int main() {
Solution obj;
- vvd(int) points1 = {{1, 1}, {2, 2}, {3, 3}},
+ vvd points1 = {{1, 1}, {2, 2}, {3, 3}},
points2 = {{1, 1}, {3, 2}, {5, 3}, {4, 1}, {2, 3}, {1, 4}};
cout << obj.maxPoints(points1) << endl; // expect: 3
cout << obj.maxPoints(points2) << endl; // expect: 4