you give 0indexed integer array num length consist equal number positive negative integersyou rearrange element num modify array follow give conditionsEvery consecutive pair integer opposite signsFor integer sign order present num preservedThe rearrange array begin positive integerreturn modify array rearrange element satisfy aforementione condition Example 1input num 312524output 321524explanationthe positive integer num 312 the negative integer 254the possible way rearrange satisfy condition 321524other way 122534 312254 235142 incorrect satisfy condition Example 2input num 11output 11explanation1 positive integer 1 negative integer numsSo num rearrange 11 constraints2 numslength 2 105numslength even1 numsi 105nums consist equal number positive negative integer