We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
publicstaticList<Integer>rotLeft(List<Integer>a,intd){List<Integer>rotations=newArrayList<>();// Elements from index d to the endrotations.addAll(a.subList(d,a.size()));// Elements from the start to index drotations.addAll(a.subList(0,d));returnrotations;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →