Add Two Integers

easy math

Problem

You are given two integers num1 and num2. Return their sum, num1 + num2.

Inputnum1 = 12, num2 = 5
Output17
12 + 5 == 17.

def sum(num1, num2):
    total = num1 + num2
    return total
function sum(num1, num2) {
  const total = num1 + num2;
  return total;
}
class Solution {
    public int sum(int num1, int num2) {
        int total = num1 + num2;
        return total;
    }
}
int sum(int num1, int num2) {
    int total = num1 + num2;
    return total;
}
Time: O(1) Space: O(1)