✅ [ CPP ] | Very Easy Solution | No DP
\n#### Intuition:\n Intuition of this problem is little bit tricky\n In this question we need to do k operations on any elements. In an operation, we choose an 
\n#### Intuition:\n* Intuition of this problem is little bit tricky\n* In this question we need to do k operations on any elements. In an operation, we choose an element and `multiply it by 2`. \n* Above information says in one operation we `shift all bits to left by 1` -> `2 * num == (num << 1)` \n* In our solution we just do `all operation on only one element` because we shift all bits left sides by k times then our answer is maximise.\n\n----\n    \n#### Approach:\n* We check one by one element shifing k times left\n* Claculate maximum result\n\n----\n\n# Complexity\n- Time complexity: $$O(n * 70)$$\n- Space complexity: $$O(70)$$\n\n----\n```\nclass Solution {\npublic:\n    long long maximumOr(vector<int>& nums, int k) {\n        vector<int> freq(70, 0);\n        \n        // count the number of set bit at perticular pos\n        for(auto &x : nums) {\n            for(int i = 0; i < 32; i++) \n                if(x & (1ll << i)) freq[i]++;\n        }\n        \n        \n        long long int ans = 0;\n        for(auto &x : nums) {\n        // here we shift bits left side by k times\n            for(int i = 0; i < 32; i++)\n                if(x & (1ll << i)) {\n                    freq[i]--;\n                    freq[i + k]++;\n                }\n        // here calculate the result after shifting bits left side\n            long long int cur = 0;\n            for(int i = 0; i < 64; i++) {\n                cur = cur + ((freq[i] ? 1ll : 0ll) << i); // cur = cur + (freq[i] ? 1ll : 0ll) * pow(2, i);\n            }\n        // store maximum answer \n            ans = max(cur, ans);\n            \n        // set all bits initial state\n            for(int i = 0; i < 32; i++) \n                if(x & (1ll << i)) {\n                    freq[i]++;\n                    freq[i + k]--;\n                }\n        }\n        \n        return ans;\n    }\n};\n\n```\nHope this helps \uD83D\uDE04.\n\n----\n> If you helpful, please upvote \uD83D\uDD3C\uD83D\uDD3C
['C++']