leetcode-149-直線上最多的點數

//使用除法會有精度問題,借用最大公約數(輾轉相除)構造pair代替斜率k class Solution { public:     int gcd(int x, int y) {         return y == 0 ? x : gcd(y, x%y);     }     int maxPoints(vector<vector<int>>& points) {         if (p
相關文章
相關標籤/搜索