Simple Array Sum

  • + 0 comments

    Here is my c++ solution, you can watch the explanation here : https://youtu.be/b7KAvErmVIw

    int simpleArraySum(vector<int> ar) {
        int sum = 0;
        for(int i = 0; i < ar.size(); i++){
            sum += ar[i];
        }
        return sum;
    }