[C++] Simple Brute Force Solution | 93% Less Space | Self-Explanatory
\nclass NumArray\n{\npublic:\n    vector<int> ar;\n    NumArray(vector<int> &nums)\n    {\n        if (nums.size() == 0)\n            return;\n        ar = nums
```\nclass NumArray\n{\npublic:\n    vector<int> ar;\n    NumArray(vector<int> &nums)\n    {\n        if (nums.size() == 0)\n            return;\n        ar = nums;\n    }\n\n    int sumRange(int i, int j)\n    {\n        int sum = 0;\n        for (int f = i; f <= j; ++f)\n            sum += ar[f];\n        return sum;\n    }\n\n    void update(int i, int val)\n    {\n        ar[i] = val;\n    }\n};\n```\n\nFeel Free to comment for Optimize/more better Solution. :)\n
['C']