Easy Python Solution o(n)


#1
def rotateArray(self, A, B):
        for i in xrange(B%len(A)):
            first = A.pop(0)
            A.append(first)
        return A

#2

Very nice. It really is very smart!