Cisco interview question

Group even and odd elements from an array