Freshworks Interview Question

Question: Input array = [a,b,c,d,e] num=2 and output [c,d,e,a,b] That is it, figure out what you need to do.

Interview Answers

Anonymous

Oct 22, 2021

I think it's a simple question Output is: index of num to till the end + beginning to till the num+1 In python I can write in a single line print (arr [num:] + arr [:num+1])

Anonymous

Oct 22, 2021

I think it's a simple question Output is: index of num to till the end + beginning to till the num+1 In python I can write in a single line print (arr [num:] + arr [:num+1])