filmov
tv
Right rotate a given array by K steps CSE Interview Prep

Показать описание
Given an array and k, rotate this array to the right by k steps.
example:
i/p : [1,2,3,4,5,6,7] , k = 3
o/p : [5,6,7,1,2,3,4]
Come up with the brute force approach and then jump to the optimized approach.
example:
i/p : [1,2,3,4,5,6,7] , k = 3
o/p : [5,6,7,1,2,3,4]
Come up with the brute force approach and then jump to the optimized approach.