Goldman Sachs || Easy Solution
#ReviseWithArsh #6Companies30Days challenge 2k24\nCompany 1 :- Goldman Sachs\n\n# Code\n\n#include <vector>\n\nclass Solution {\n    int row = 0, col = 0;\n    
***#ReviseWithArsh #6Companies30Days challenge 2k24\nCompany 1 :- Goldman Sachs***\n\n# Code\n```\n#include <vector>\n\nclass Solution {\n    int row = 0, col = 0;\n    int totalRows = 0, totalCols = 0;\n\npublic:\n    Solution(int m, int n) : totalRows(m), totalCols(n) {}\n\n    std::vector<int> flip() {\n        col++;\n        if (col == totalCols) {\n            col = 0;\n            row++;\n        }\n        if (row == totalRows) {\n            row = 0;\n            col = 0;\n        }\n\n        return {row, col};\n    }\n\n    void reset() {\n        // Resetting is not necessary since it will automatically reset when reaching the end.\n    }\n};\n\n```
['C++']