JavaScript easy and fast solution (93.71% faster)
\n\n\n\n* only sort the zeros:  nums.sort((a,b)=> !a - !b)\n\n\n# Code\n\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar applyOperations = func
\n\n\n\n* only sort the zeros:  nums.sort((a,b)=> !a - !b)\n\n\n# Code\n```\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar applyOperations = function(nums) {\n    for (let i=0;i<nums.length;i++){\n        if (nums[i]==nums[i+1]){\n            [nums[i],nums[i+1]]=[nums[i]*2,0];\n        }\n    }return nums.sort((a,b)=> !a - !b );\n};\n    \n\n```
['JavaScript']