C++ solution


  • 0
    M

    using std::valarray

    int getSum(int a, int b) {
    int arr[2]={a,b};
    valarray<int> sum(arr,2);
    return sum.sum();
    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.