Leetcode easy
Leetcode::problem add two integers
Leetcode ps easy
Leetcode::add two integers
- Link : Leetcode:add two integers
- Solved, 1 1 1 0 0
- level : easy
point
- Given two integers nums1 and num2, return the sum of the two integers.
Design
- Return the sum of the given two integers.
Big O(time)
- TIME : O(1)
- SPACE : O(1)
Code
class Solution {
public:
int sum(int num1, int num2) {
return num1 + num2;
}
};