you give 0indexed array num size n consist nonnegative integersYou need apply n 1 operation array ith operation 0indexe apply follow ith element numsif numsi numsi 1 multiply numsi 2 set numsi 1 0 otherwise skip operationafter perform operation shift 0s end arrayfor example array 102001 shift 0s end 121000return result arraynote operation apply sequentially Example 1input num 122110output 142000explanation we follow operation 0 nums0 nums1 equal skip operation 1 nums1 nums2 equal multiply nums1 2 change nums2 0 the array 140110 2 nums2 nums3 equal skip operation 3 nums3 nums4 equal multiply nums3 2 change nums4 0 the array 140200 4 nums4 nums5 equal multiply nums4 2 change nums5 0 the array 140200after shift 0s end give array 142000example 2input num 01output 10explanation no operation apply shift 0 end Constraints2 numslength 20000 numsi 1000