Skip to content

2235. Add Two Integers 👎

  • Time: $O(1)$
  • Space: $O(1)$
1
2
3
4
5
6
class Solution {
 public:
  int sum(int num1, int num2) {
    return num1 + num2;
  }
};
1
2
3
4
5
class Solution {
  public int sum(int num1, int num2) {
    return num1 + num2;
  }
}
1
2
class Solution:
  sum = operator.add