Easy Solution Here 
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    vector<int> constructArray(int n, int k) {
        vector<int> ans(n);
        iota(ans.begin(),ans.end(),1);
        if(k == 1) return ans;
        k--;
        for(int i = 1;i < n && k > 0;i++){
            cout<<ans[i]<<endl;
            reverse(ans.begin()+i,ans.end());
            cout<<ans[i]<<endl;
            k--;
        }
        return ans;
    }
};
```
['Array', 'Math', 'C', 'C++']