printing combinations from a given array.
surprisingly this got accepted in first attempt. D