c++ using array, simulation (4ms)
\nTo simulate, we enumerate rounds. For each round, we go one sector at a time, taking care of sector number starts with 1, not zero. Also making sure not to do
\nTo simulate, we enumerate rounds. For each round, we go one sector at a time, taking care of sector number starts with 1, not zero. Also making sure not to double count the first sector from second round.\n\n```\n vector<int> mostVisited(const int n, const vector<int>& rounds) const {\n        \n       \n        \n        array<int,101> sector_visits;\n        sector_visits.fill(0);\n        \n        const unsigned round_count = rounds.size();\n        for (auto round = 1; round < round_count; ++round) {\n            \n            int start_sector = rounds[round - 1 ];\n            if (round  >  1) {\n                ++start_sector;\n                if (start_sector > n)\n                    start_sector = 1;\n            }\n          const int end_section = (rounds[round] ) % (1 + n);\n\n            for (auto sector = start_sector; sector != end_section;) {\n            \n                sector_visits[sector]++;\n                ++sector;\n                if (sector > n)\n                    sector = 1;\n            }\n\n            sector_visits[end_section]++;        \n        }\n       \n\n        auto sector_it = max_element(begin(sector_visits), end(sector_visits));\n          \n        vector<int> result;\n        auto maxi = *sector_it;\n        for (size_t idx = 0; idx < sector_visits.size(); ++idx){\n            if (maxi == sector_visits[idx]) \n                result.push_back(idx);\n        }\n        \n        return result;\n    }
['C']