MeetCode
Angle Type By Dot Product
C
C++
Computer Mathematics
CSS
DSA
HTML
Java
JavaScript
NodeJS
PHP
Programming Interview
Python
ReactJS
SQL
Run
Submit
Dark
Problem Statement
Solutions
Submissions
Angle Type By Dot Product
Medium
Computer Mathematics
Linear Algebra Basics
29 views
Explanation
Complexity
Problem Statement
Given two 2D vectors, print ACUTE/RIGHT/OBTUSE.
Input Format
ax ay bx by.
Output Format
One word.
Example
Input
1 0 0 1
Output
RIGHT
Constraints
Values fit 64-bit
Input / Output Format
Input Format
ax ay bx by.
Output Format
One word.
Constraints
Values fit 64-bit
Examples
Input:
1 0 0 1
Output:
RIGHT
Example Solution (Public)
Computer Mathematics
Compute dot=ax*bx+ay*by. If dot==0 RIGHT, if >0 ACUTE else OBTUSE.
Official Solution Code
Wrap
Copy
Compute dot=ax*bx+ay*by. If dot==0 RIGHT, if >0 ACUTE else OBTUSE.
Please
login
to submit solutions.
Editor
C
C++
Computer Mathematics
CSS
DSA
HTML
Java
JavaScript
NodeJS
PHP
Programming Interview
Python
ReactJS
SQL
Test Cases
Output
Submission Result
Input
1 0 0 1
Expected Output
RIGHT
Compile Output
Error
Output
Please
login
to submit solutions.