good
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minimumSeconds(vector<int>& nums) {\n       unordered_map<int,vector<int>> mp; \n        for(int i=0;i<nums.size();i++)\n        { \n            mp[nums[i]].push_back(i);  // storing in map\n        } \n        int mn=INT_MAX; \n        for(auto it:mp)\n        { \n            vector<int> v=it.second; \n            int cur=(v[0]-0)+(nums.size()-1-v[v.size()-1]); \n            for(int i=0;i<v.size()-1;i++){ \n                cur=max(cur,v[i+1]-v[i]-1);  // checking condition\n            } \n            cur=ceil((double)cur/2); \n            mn=min(mn,cur); \n        } \n        return mn;   // returning ans\n    }\n};\n```
['C++']