Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Valid Square
Bookmark
Input
Valid square
Rotated valid square
Not a square
All same point
Custom
p1
=
[0, 0]
,
p2
=
[1, 0]
,
p3
=
[1, 1]
,
p4
=
[0, 1]
0
1
0
1
p1(0,0)
p2(1,0)
p3(1,1)
p4(0,1)
algo
master
.
io
Step:
Start: Given 4 points, determine if they form a valid square
0 / 10
Input
Valid square
Rotated valid square
Not a square
All same point
Custom
p1
=
[0, 0]
,
p2
=
[1, 0]
,
p3
=
[1, 1]
,
p4
=
[0, 1]
0 / 10
0
1
0
1
p1(0,0)
p2(1,0)
p3(1,1)
p4(0,1)
algo
master
.
io
Step:
Start: Given 4 points, determine if they form a valid square