2 methods in python, beat 95.49%
first, reverse list in place, easy to code but slow, takes about 675ms:\n\n    def constructArray(self, n, k):\n        result = range(1, n + 1)\n        for i 
first, reverse list in place, easy to code but slow, takes about 675ms:\n```\n    def constructArray(self, n, k):\n        result = range(1, n + 1)\n        for i in range(1, k):\n            result[i:] = result[:i - 1:-1]\n        return result\n```\nsecond, use deque, takes about 85ms, beat 95%:\n```\n    def constructArray2(self, n, k):\n        from collections import deque\n        src = deque(range(1, n + 1))\n        dst = [src.pop() if i % 2 else src.popleft() for i in range(k)]\n        if k % 2 == 0:\n            src.reverse()\n        dst.extend(src)\n        return dst
[]