vector <string> matrix = {"1,2,3", "4,5,6", "7,8,9"};
How to remove the comma ',' from each string element above in c++ while keeping the time complexity to be O(n) or using a single loop?
Right now, matrix[0][1] = ',' ;
I want it to be matrix[0][1] = 2;