I have this 2d array:
vector<vector<int>> arr = {{1, 1},
{1, 3, 2},
{1, 6, 11, 6}};
I want to add the lasts elements of each row (1 + 2 + 6), and then the second-lasts (1 + 3 + 11), and so on ((1 + 6), (1)). How can I do that?
Btw sorry for my english (not native speaker).