Skip to content

Commit 3d6ea4e

Browse files
author
Dhruv Singh
committed
Add solution for array left rotation
1 parent 7db1c28 commit 3d6ea4e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hackerrank/array-left-rotation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# -*- coding: utf-8 -*-
2+
# https://www.hackerrank.com/challenges/array-left-rotation
3+
4+
n, d = map(int, raw_input().split())
5+
a = map(str, raw_input().split())
6+
print ' '.join(a[d:] + a[0:d])

0 commit comments

Comments
 (0)