From 7b8a219cd17e37b7dfa8012c425acd0d66d16785 Mon Sep 17 00:00:00 2001 From: Upendra Paswan <91420532+up2002@users.noreply.github.com> Date: Tue, 11 Oct 2022 16:07:05 +0530 Subject: [PATCH] Max Points on a Line Hacktober fest-2022 --- C++/Max Points on a Line | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 C++/Max Points on a Line diff --git a/C++/Max Points on a Line b/C++/Max Points on a Line new file mode 100644 index 0000000..3abb5ff --- /dev/null +++ b/C++/Max Points on a Line @@ -0,0 +1,34 @@ +class Solution{ +public : + + int maxPoints(vector>& points) + { + if(points.size()<=2) return points.size(); + int res=0; + int n=points.size(); + for(int i=0;i