creates and array and solves it