Given an input array [1,2,3,4,5], output should be [5, 4, 1, 2, 3] if count is 2.
func (array: [Int], count: Int)
After you are done with the solution, the interviewer will ask about the time complexity of it. And will ask you if you can improve it to lessen the complexity