← ALL NOTES
Array

1427. Perform String Shifts

Apply a list of cyclic shifts ([dir, amount], dir 0 = left, 1 = right) to string s and return the result. The trick: all the shifts collapse into a single net offset modulo n — order and intermediate…

Loading…