{"ScriptPreparationCode":"\tfunction Custom(iterable = null) {\r\n\t\tif (iterable !== null) {\r\n\t\t\tthis.array = Array.from(iterable);\r\n\t\t} else {\r\n\t\t\tthis.array = [];\r\n\t\t}\r\n \tthis.length = this.array.length;\r\n\t\tthis.index0 = 0;\r\n\t}\r\n\tCustom.prototype.item = function (accessor) {\r\n\t\treturn this.array[this.index0 \u002B Number(accessor)];\r\n\t};\r\n\tCustom.prototype.set = function (index, value) {\r\n\t\tconst newIndex = this.index0 \u002B Number(index);\r\n\t\tif (newIndex \u003E= this.length) {\r\n\t\t\tthis.length = newIndex \u002B 1;\r\n\t\t}\r\n\t\tthis.array[newIndex] = value;\r\n\t};\r\n\tCustom.prototype.shift = function () {\r\n\t\tif (this.length !== 0) {\r\n\t\t\tthis.length--;\r\n\t\t\tthis.index0\u002B\u002B;\r\n\t\t\treturn this.array[this.index0 - 1];\r\n\t\t}\r\n\t\treturn undefined;\r\n\t};\r\n\tCustom.prototype.pop = function () {\r\n\t\tif (this.length !== 0) {\r\n\t\t\tthis.length--;\r\n\t\t\treturn this.array[this.index0 \u002B this.length];\r\n\t\t}\r\n\t\treturn undefined;\r\n\t};\r\n\tCustom.prototype.push = function (value) {\r\n\t\tthis.array[this.index0 \u002B this.length] = value;\r\n\t\tthis.length\u002B\u002B;\r\n\t};\r\nvar a1 = new Array(65535);\r\nvar a2 = new Array(65535);\r\nvar q = new Custom(new Array(65535));\r\nvar s = new Custom(new Array(65535));","TestCases":[{"Name":"Array Shift","Code":"a1.shift();\r\na1.shift();\r\na1.shift();","IsDeferred":false},{"Name":"Array Pop","Code":"a2.pop();\r\na2.pop();\r\na2.pop();","IsDeferred":false},{"Name":"Custom Shift","Code":"q.shift();\r\nq.shift();\r\nq.shift();","IsDeferred":false},{"Name":"Custom Pop","Code":"s.pop();\r\ns.pop();\r\ns.pop();","IsDeferred":false}]}