C++ Beginner's Approach|| Very Easy Implementation
\tclass NumArray {\n\tpublic:\n    vector tree;\n    int n;\n    vector num;\n    int cons(int ss,int se,int si)\n    {\n        if(ss==se)\n        {\n        
\tclass NumArray {\n\tpublic:\n    vector<int> tree;\n    int n;\n    vector<int> num;\n    int cons(int ss,int se,int si)\n    {\n        if(ss==se)\n        {\n            tree[si] = num[ss];\n            return tree[si];\n        }\n        int mid = (ss+se)/2;\n        tree[si] = cons(ss,mid,2*si+1)+cons(mid+1,se,2*si+2);\n        return tree[si];\n    }\n    void upda(int ss,int se,int si,int i,int diff)\n    {\n        if(ss>i||se<i)return ;\n        tree[si] += diff;\n        \n        if(se>ss)\n        {\n            int mid= (se+ss)/2;\n            upda(ss,mid,2*si+1,i,diff);\n            upda(mid+1,se,2*si+2,i,diff);\n        }\n        return ;\n    }\n    int sumr(int qs,int qe,int ss,int se ,int si)\n    {\n        if(qs>se||qe<ss)return 0;\n        if(qs<=ss&&qe>=se)return tree[si];\n        int mid = (se+ss)/2;\n        return sumr(qs,qe,ss,mid,2*si+1)+sumr(qs,qe,mid+1,se,2*si+2);\n    }\n    NumArray(vector<int>& nums) {\n        n = nums.size();\n        tree = vector<int>(4*n);\n        num = nums;\n        cons(0,n-1,0);\n    }\n    \n    void update(int i, int val) {\n        int diff  = val - num[i];\n        num[i] = val;\n        upda(0,n-1,0,i,diff);\n        \n    }\n    \n    int sumRange(int qs, int qe) {\n        return sumr(qs,qe,0,n-1,0);\n    }\n\t};
['Tree', 'Recursion', 'C', 'C++']