I just wrote a code regarding array rotation while studying for Data Structure. I needed to know how I can improve below program by measuring time and space complexity. 

Program for array rotation.
Rotation of the array by 2 will make array

1,2,3,4
Input

3,4,1,2
Output

```
  public class Program
    {

        public static void Main(string[] args)
        {
            int arrayCount = 0;
            int rotate = 2;
        int []answer = new int[4];

            for (int i = 0; i < answer.Length; i++)
            {
                answer[i] = Convert.ToInt32(Console.ReadLine());
            }
            arrayCount = answer.Count();
            ArrayRotation.displayRotatedArray(answer, rotate, arrayCount);
            ArrayRotation.printArray(answer, arrayCount);
            Console.ReadKey();
        }
    }

 public static class ArrayRotation
    {
        public static void displayRotatedArray(int []temp, int rotate, int count)
        {

           int c = rotate;
            int d = rotate;
            int[] firstOccurenceArray = new int[rotate];

                for (int g = 0; g < rotate; g++)
                {
                    int num = g;
                    firstOccurenceArray[g] = temp[g];
                }
                for (int i = 0; i < temp.Length - c; i++)
                {
                    temp[i] = temp[rotate];
                    rotate++;
                }
            for (int k = 1; k < d + 1; k++)
            {
                temp[count - k] = firstOccurenceArray[c - 1];
                c--;
            }
        }
        /* utility function to print an array */
       public static void printArray(int[] temp, int size)
        {
            for (int i = 0; i < size; i++)
                Console.Write( temp[i] + " ");
        }
    }

```