Vector Overloading

Medium

📝 Description

Implement operator overloading for a Vector class (+, -)

Input Format

Two vectors and an operation

Output Format

Resulting vector

Constraints

2D vectors only

🔍 Sample Input

Vector(1,2) + Vector(3,4)
            

✅ Sample Output

Vector(4,6)
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run