Google 😍🔥 || Easy Beginner's Approach || Using Map || C++
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```\n#include<algorithm>\n#include<string>\nclass Solution {\npublic:\n    string decodeCiphertext(string s, int m) {\n        \n        int k=s.size();\n        int n=k/m;\n        int h=0;\n        int x=0;\n        string ans="";\n        unordered_map<int,string> p;\n        for(int i=0;i<m;i++)\n        {\n            for(int j=0;j<n;j++)\n            {\n                p[j-i]+=s[h++];\n                x=max(x,j-i);\n            }\n        }\n        for(int i=0;i<=x;i++)\n        {\n            ans+=p[i];\n        }\n        \n    for (int i = ans.size() - 1; i >= 0; --i) {\n        if (ans[i] == \' \' || ans[i] == \'\\t\') {\n            // Remove the space character\n            ans.erase(i, 1);\n        } else {\n            // Stop when a non-space character is encountered\n            break;\n        }\n    }\n\n    \n        return ans;\n    }\n};\n```
['Hash Table', 'Ordered Map', 'Python', 'C++', 'Java', 'Python3']