Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Max Points on a Line
Bookmark
Input
All collinear (3)
Mixed (result=4)
Two points (2)
Two lines
Custom
points
=
[[1,1],[2,2],[3,3]]
1
2
3
1
2
3
(1,1)
(2,2)
(3,3)
algo
master
.
io
Step:
Start: Find the maximum number of points on the same line
Variable
Value
result
0
localMax
-
anchor
-
Variable
Value
slope
-
n
3
0 / 32
Input
All collinear (3)
Mixed (result=4)
Two points (2)
Two lines
Custom
points
=
[[1,1],[2,2],[3,3]]
0 / 32
1
2
3
1
2
3
(1,1)
(2,2)
(3,3)
algo
master
.
io
Step:
Start: Find the maximum number of points on the same line
Visualization
Variables