You are viewing a single comment's thread. Return to all comments →
I was using the nested loop algo, was getting timed out. Then i used this (JAVA) Collections.rotate(Arrays.asList(array_name), k);
i am a beginner, can anyone tell me is this a bad way to solve a problem, if yes why?
Seems like cookies are disabled on this browser, please enable them to open this website
Circular Array Rotation
You are viewing a single comment's thread. Return to all comments →
I was using the nested loop algo, was getting timed out. Then i used this (JAVA) Collections.rotate(Arrays.asList(array_name), k);
i am a beginner, can anyone tell me is this a bad way to solve a problem, if yes why?