#2235
Easy Algorithms Add two integers
Math
87.9% acceptance
Feb 25, 2026
2101
3224
Given two integers num1 and num2, return the sum of the two integers.
Solution
Rust
Time O(1)
Space O(1)
impl Solution {
pub fn sum(num1: i32, num2: i32) -> i32 {
num1 + num2
}
}