Problem
Java
1
1 | import java.math.BigDecimal; |
Submission Detail
- 41 / 41 test cases passed.
- Runtime: 14 ms, faster than 72.08% of Java online submissions for Max Points on a Line.
- Memory Usage: 39.6 MB, less than 41.21% of Java online submissions for Max Points on a Line.
programcreek
© https://www.programcreek.com/2014/04/leetcode-max-points-on-a-line-java/
This problem can be solve by counting points that have the same slope for each point. When counting, we need to be careful about the duplicate points and points on the vertical lines.
1 | import java.math.BigDecimal; |
Submission Detail
- 41 / 41 test cases passed.
- Runtime: 25 ms, faster than 42.00% of Java online submissions for Max Points on a Line.
- Memory Usage: 40.4 MB, less than 20.64% of Java online submissions for Max Points on a Line.