Rearrange array into alternate positive and negative numbers

Given an array containing both positive and negative integers, write code to rearrange the elements so that positive and negative numbers comes alternately. If positive (or negative) integers is not equal in number then extra positive (or negative) numbers should come at the end of array. For example: Input : {1, 2, -2, -5, 6, […]