Skip to content

Instantly share code, notes, and snippets.

View ammarshaikh123's full-sized avatar

Ammar Shaikh ammarshaikh123

View GitHub Profile
@ammarshaikh123
ammarshaikh123 / Arrays: Left Rotation
Created May 27, 2019 11:42
A left rotation operation on an array shifts each of the array's elements unit to the left. For example, if left rotations are performed on array , then the array would become . Given an array of integers and a number, , perform left rotations on the array. Return the updated array to be printed as a single line of space-separated integers. Func…
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the rotLeft function below.
def rotLeft(a, d):