Hacker Rank: Array left rotation
About naming:

intI and intK: don't include the type in the variable name, it is obvious from the context and intellisense and as a loop index a plain i and k are more understandable.



A first simple optimization is that you can avoid the check if intK has reached the end: 


  a.Length - 1 == intK ?


Instead you can just iterate up to a.Length - 1 and then append temp at the end:

public static int[] rotLeft(int[] a, int d)
{
  for (int intI = 0; intI &lt; d; intI++)
  {
    int temp = a[0];

    for (int intK = 0; intK &lt; a.Length - 1; intK++)
    {
      a[a.Length - (a.Length - intK)] = a[a.Length - (a.Length - (intK + 1))];
    }

    a[a.Length - 1] = temp;
  }

  return a;
}




Next step is to consider the math:

a.Length - (a.Length - intK) = a.Length - a.Length + intK = intK


and in the same way:

a.Length - (a.Length - (intK + 1)) = intK + 1


So you could write:

public static int[] rotLeft(int[] a, int d)
{
  for (int intI = 0; intI &lt; d; intI++)
  {
    int temp = a[0];

    for (int intK = 0; intK &lt; a.Length - 1; intK++)
    {
      a[intK] = a[intK + 1];
    }

    a[a.Length - 1] = temp;
  }

  return a;
}




But the real performance problem is that you move each entry in the array d number of times. You can move each entry just once by moving it d places. A simple way to do that could be:

public static int[] rotLeft(int[] a, int d)
{
  int[] temp = new int[d];

  for (int i = 0; i &lt; d; i++)
    temp[i] = a[i];

  for (int i = d; i &lt; a.Length; i++)
  {
    a[i - d] = a[i];
  }

  for (int i = 0; i &lt; d; i++)
    a[a.Length - d + i] = temp[i];

  return a;
}




Another issue is that you operate on the input array a directly and return it as a return value. In this way both the return value and a contains the shifted values. In a challenge like this it may not be important, but I think I would return a new array with the shifted data leaving a unchanged - in "real world":

public static int[] rotLeft(int[] a, int d)
{
  int[] result = new int[a.Length];

  for (int i = d; i &lt; a.Length; i++)
  {
    result[i - d] = a[i];
  }

  for (int j = 0; j &lt; d; j++)
  {
    result[a.Length - d + j] = a[j];
  }

  return result;
}


If you want to operate on a directly intentionally it would be more consistent returning void to signal that you're operating on the input directly.