This is a function problem. You don't need to take any input, as it is already accomplished by the driver code. You just need to complete the function leftRotate() that takes array arr, integer K and integer N as parameters and rotate the given array by d value.
Expected Time Complexity: O(N). Expected Auxiliary Space: O(1).