Easy to understand C solution 😊
\n# Approach\n Describe your approach to solving the problem. \nIterate through the operations and perform corresponding\noperation,store the result in the reco
\n# Approach\n<!-- Describe your approach to solving the problem. -->\nIterate through the operations and perform corresponding\noperation,store the result in the record array.Finally calculate the sum of record array.\n# Code\n```\nint calPoints(char** operations, int operationsSize) {\n    int *record=(int *)malloc(sizeof(int)*operationsSize);\n    int s=0,index=0;\n    for(int i=0;i<operationsSize;i++){\n        if(strcmp(operations[i],"C")==0){\n            record[index-1]=0;\n            index--;\n        }\n        else if(strcmp(operations[i],"D")==0){\n            record[index++]=record[index-1]*2;\n        }\n        else if(strcmp(operations[i],"+")==0){\n            record[index++]=record[index-1]+record[index-2];\n        }\n        else{\n            record[index++]=atoi(operations[i]);\n        }\n    }\n    for(int i=0;i<index;i++){\n        s+=record[i];\n    }\n    return s;\n}\n```
['C']