You are viewing a single comment's thread. Return to all comments →
The test case is a large array with a large amount of shits. If your algorithim is not effecient than it will time out.
Array size: 73642
Left shifts: 60581
I agree that it timesout if the algorithm is not efficient enough. Instead of relying on rudimental loops, try using a linked list which simplifies its complexity significantly to O(dn).